|
-
September 25th, 2009, 09:18 AM
#1
AfxMessageBox position
Hi all,
My main dialog create and display a second dialog.
The second dialog can create another dialog when a user click on a button:
--------------- ------------ ------------
| main dlg | -> | 2nd dlg | -> | 3rd dlg |
--------------- ------------- ------------
Code:
void OnClick()
{
// Create the 3rd dialog
m_pMy3rdDlg->Create(CMy3rdDlg::IDD, GetDesktopWindow());
if ( !pMy3rdDlg->InitializationSucceeded() )
AfxMessageBox( _T("Failed") );
}
My problem is that if my second dialog needs to display a message box,
It is shown on the main dialog instead of the 2nd dialog.
How can I sort it out?
Many thanks!
-
September 25th, 2009, 09:53 AM
#2
Re: AfxMessageBox position
Use ::MessageBox() instead. You can pass a HWND to set the owner of the messagebox.
-
September 25th, 2009, 10:35 AM
#3
Re: AfxMessageBox position
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|