I have a simplest sample to test Modelless Dialog, but Modelless Dialog allways disappear after created
CMainDlg: is main dialog
CModellesDialog : is other dialog
OnButton1: call a CModellesDialog , but CModellesDialog disappear after created!
- This is my simple sample source
void CMainDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CModellesDialog dlg;
dlg.Create(IDD_DIALOG1,NUL
L);
dlg.ShowWindow(1);
AfxMessageBox(".... if remove this AfxmessageBox, dlg modelles will also close");
}
How to keep CModellesDialog concurrent with MainDialog?
Start Free Trial