|
-
April 2nd, 1999, 10:10 AM
#1
A simple question about Modeless Dialogs...
When my program starts, it is supposed to have a modeless dialog box displayed ontop of the main application window. However, when the program starts this is not what happens.
First, the dialog box appears as I would expect, but then the Dialog box is covered up by the main application's window.
My dialog box is a member of the CMainFrame class, and I attempt to display the dialog at the very end of the CMainFrame::OnCreate function. Doing this works with MDI applications, but not with SDI applications for some reason.
Any help would be appriciated.
Mike.
-
April 2nd, 1999, 10:30 AM
#2
Re: A simple question about Modeless Dialogs...
A simple solution:
1. create a public function in CMainFrame class, e.g., ShowMyDialog() and put those codes to display the modeless dislog.
2. call this function in the App's InitInstance(), but call it after initializing MainFrame:
pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);
pMainFrame->UpdateWindow();
pMainFrame->ShowMyDialog();
Hope this will help. Good luck.
Lynx
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
|