PhilN
April 30th, 1999, 01:25 PM
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.
Troy T
April 30th, 1999, 01:37 PM
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