|
-
April 30th, 1999, 01:25 PM
#1
Centering MessageBox to the owner window
I need to display a MessageBox (MFC version) which would centered the application window instead of the desktop. A SDK version of MessageBox take the handle of the owner window as its first parameter but MFC version does not have this options. Thanks.
-
April 30th, 1999, 01:37 PM
#2
Re: Centering MessageBox to the owner window
Is there a specific reason that you must use the CWnd::MessageBox instead of ::MessageBox?? I believe that the only way that you're going to accomplish what you want is to use the ::MessageBox function, and give it the handle to the parent window that you want the messageBox to be centered on.
Example:
::MessageBox(this->GetSafeHwnd(), _T("MessageBody"), _T("Title"), MB_OK|MB_ICONEXCLAMATION);
That should solve that problem for you.. Good luck.
- Troy
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
|