|
-
May 12th, 1999, 08:12 PM
#1
how can I force a dialog box to disappear and create another
I created dialog based application and I have 2 separate modal dialog boxes. If the user
hits ok in the first modal dialog box, I want that modal box to disappear and the other
dialog box to popup, but when I implement the following code;
void Modal::OnOk()
{
DestroyWindow();
CModal1 dlg1;
dlg1.DoModal();
}
both dialog boxes disappear. Is there any way I can specify that I want
just the first modal dialog box to disappear?
Details are cherished. Any response anyone can give me will be greatly
appreciated.
-
May 13th, 1999, 05:12 AM
#2
Re: how can I force a dialog box to disappear and create another
Use ShowWindow(SW_HIDE) prior to the DoModal call, such as:
void CTwoDlgTestDlg::OnOK()
{
ShowWindow(SW_HIDE);
CDlgTwo dlg;
dlg.DoModal();
CDialog::OnOK();
}
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
|