I have a Dialog
and when I load a MDI from that dialog,
the MDI will hide behind the dialog.
Even after i hide the dialog,
I still can not access to the MDI.
Help!
Printable View
I have a Dialog
and when I load a MDI from that dialog,
the MDI will hide behind the dialog.
Even after i hide the dialog,
I still can not access to the MDI.
Help!
Are you using a modal or a modeless dialog ?
I am using a modal Dialog.
Ok.
First. Why do you want to hide the modal dialog ?
Note that one of the things DoModal does is to disable the parent window. So, that is the reason, why you won't be able to use any other window when you are using a modal dialog. And that is the same reason, you are not able to use the MDI possibly. Just hiding the modal window does not change the enabled/disabled state of the parent window. So, after hiding the modal dialog, you need to enable the parent explicitly by calling EnableWindow..
Having said that, if your app calls for being able to access the MDI even when the dialog is existing, why not use a modeless dialog. One of the things modeless dialogs do is to just hide the dialog when you click on the close button ( the dialog itself is not destroyed ).
YES!! IT WORKS!
THANK YOU SO MUCH.
d-_-b two thumbs for you.
HOW I DID:
after showing up the MDI
pMainFrame->ShowWindow(SW_SHOW);
pMainFrame->UpdateWindow();
I Added
pMainFrame->EnableWindow(TRUE);