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.
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();
}