|
The first parameter of MessageBox is a HWND. If you pass the HWND of AutoCAD, then the message box will have the AutoCAD window as it's parent.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
MessageBox(NULL,"TRY","TRY",MB_OK);
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Thanx All for the replies my problem is solved I m generating the msgbox in my Acad window its great to be the member of this community
|
|
|
|
|
So the MessageBox is what you've been looking for? hmm anyway you are most welcome to the CodeProject
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Hi,
I created two dialog boxes.I want to get data from a control in one dialog box into another dialog box.
Can anyone say how to get it.
Thank you.
|
|
|
|
|
vc++_fragrance wrote: Hi,
I created two dialog boxes.I want to get data from a control in one dialog box into another dialog box.
Can anyone say how to get it.
Thank you.
Write one Set function to set the data into the second dialog and then display this dialog.
For eg:
void SetData( PVOID pCustomData )
{
m_myData = (PMYDATA) pCustomData;
}
Or pass the data to the constructor of the second dialog...
Or use events to send the data to the second dialog and wrap the data inside the LPARAM or WPARAM parameters.
|
|
|
|
|
Use SendMessage Function that could be helpful for you.
|
|
|
|
|
WTF !?
|
|
|
|
|
WTF ?????
|
|
|
|
|
HEY !!!!!
you have a problem with your signature, don't you ?
|
|
|
|
|
Why not you delete this?
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
You can modify your message.
|
|
|
|
|
Suppose you are creating these dialog in some class say a dialog class
CMainDlg
Class CMainDlg:Public CDialog
{
private:
Dlg1* pDlg1;
Dlg2* pDLg2;
......
}
Then in Class Dlg1 expose a function to Get the other dialog control's data and in class Dlg to set theat data
for eg
Class Dlg1:public CDilaog
{
public
CString GetDataFrmControl(); // supposing control's data type is of type CString
}
Class Dlg2:public CDilaog
{
public
void SetDataToControl( CString& Data ); // supposing control's data type is of type CString
}
///////////////////////////
CMainDLg::OnInitDialog
{
PDlg1 = new Dlg1;
pDlg2 = new Dlg2;
pDLg1->Create(..)
pDlg2->Create(..)
// pass the value from one dialog to another where ever needed
pDlg2->SetDataToControl( pDLg1->GetDataFrmControl())
}
Rinu Raj
|
|
|
|
|
What is the relationship between the two dialogs? Are they siblings? Does one "own" the other? Are they both modal?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The two dialog boxes are modal dialog boxes
|
|
|
|
|
///////if your main class is CMainDlg In another dialog you can use
<br />
#include "MainDlg.h"<br />
CMainDlg *m_Main=GetParent();<br />
m_Main->Yourfunction();<br />
|
|
|
|
|
Hey guys,
My name is Danny and I am working on a project using MFC based dialog and property pages. This question may sound really dumb, but I've added a key down handler for a property page I'm working on and for love or money I can't seem to get it to respond. I've thrown brake points everywhere and I can't get it to respond.
Are there any suggestions out there?
Thanks Guys.
Danny Nowlan
|
|
|
|
|
Map the WM_KEYDOWN message there you wil get which key is being pressed
Rinu Raj
|
|
|
|
|
|
Hi,
I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar. Except I'm not sure what to be checking lParam against. I've casted lParam to be a NMHDR*, but when I check the value of pNMHDR->code, it's usually 0xFFFFFFF4.
Can anyone tell me what xxxxx should be in the following line?
BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) <br />
{<br />
NMHDR* pNMHDR = (NMHDR*)lParam;<br />
<br />
if(pNMHDR->code == xxxxx) <br />
{<br />
}<br />
}
Or can someone tell me if I'm going about this the wrong way?
Thanks,
skyapie
|
|
|
|
|
You will get control at OnVScroll() OnHScroll() when the suer scrolls the scrol bar
Rinu Raj
|
|
|
|
|
That will work if the scrollbar is for the view, not for a list control or list box in the view...
|
|
|
|
|
skyapie wrote: I'm using the OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) method to find out when a user uses a scrollbar
If this scrollbar is of this view only then it will not send WM_NOTIFY message. Handle WM_VSCROLL message
skyapie wrote: BOOL CBaseFormView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
NMHDR* pNMHDR = (NMHDR*)lParam;
if(pNMHDR->code == xxxxx)
{
//Do stuff
}
}
This code will work , if you want to handle scrolling of child window of this view, lets say scrolling in listcontrol present as child of this view.
|
|
|
|
|
Hi !
I'm compiling my project with warnings at level 3. I didn't change any warning-behavior with #pragma.
The problem is that I get many warning C4100 (unreferenced formal parameter) because of included headers. How can I get rid of these warnings for which I cannot do anything anyway ?
(btw : I've seen somewhere that warning C4100 is level 4, but it occurs at level 3, that's strange ! any hint about this ?)
Thanks for your help !
Jerome
|
|
|
|
|