基于对话框的程序有关问题
基于对话框的程序问题
CLoginDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
//这些语句放下面不可行?
/*
CVcdomainDlg maindlg;
m_pMainWnd = &maindlg;
maindlg.DoModal();*/
}
else if (nResponse == IDCANCEL)
{
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application 's message pump.
return FALSE;
------解决方案--------------------
这是在主对话框里吧,主对话框退出了程序也退出了,下面的代码执行不到。
CLoginDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
//这些语句放下面不可行?
/*
CVcdomainDlg maindlg;
m_pMainWnd = &maindlg;
maindlg.DoModal();*/
}
else if (nResponse == IDCANCEL)
{
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application 's message pump.
return FALSE;
------解决方案--------------------
这是在主对话框里吧,主对话框退出了程序也退出了,下面的代码执行不到。