Modeless dialog closing a modal dialog problem
- From: Simon Guertin <sguertin@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 May 2006 16:39:56 -0400
Hello!
I have a problem when a modeless CDialog is displaying a Modal dialog.
But while the modal dialog is displayed, My main window needs to close the modeless dialog (CMyModelessDialog) because it receives a certain message from the message MAP. It does so using the message myModelessDialog->PostMessage(WM_CLOSE);
So everytime the modeless dialog closes, the modal dialog cause a crash.
My modeless dialog is implemented the proper way (by overriding the PostNCDestroy , OnCancel and OnOK)
Is there anothere approach to this problem?
Thank you for any hints
Simon
MainWindow::Problem(lparam, wparam)
{
modelessDialog->PostMessage(WM_CLOSE);
}
CMyModelessDialog::DisplayResult()
{
if(error)
{
MyModalDialog d;
d.DoModal;
}
}
.
- Follow-Ups:
- Re: Modeless dialog closing a modal dialog problem
- From: Joseph M . Newcomer
- Re: Modeless dialog closing a modal dialog problem
- From: Tom Serface
- Re: Modeless dialog closing a modal dialog problem
- Prev by Date: Re: Creating Multilingual Application
- Next by Date: Re: Modeless dialog closing a modal dialog problem
- Previous by thread: Communications Between Program and Controlling Program
- Next by thread: Re: Modeless dialog closing a modal dialog problem
- Index(es):
Relevant Pages
|