model对话框一modal就正常退出了可能是什么原因?
请问model对话框一modal就正常退出了是什么原因?
我就这一个modal对话框,在app里面调用:
CXXXDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
...
else if (nResponse == IDCANCEL)
...
我跟踪的时候发现nResponse即不等于IDOK也不等于IDCANCEL.DoModal的时候马上就返回退出了。Debug框里面显示的也是has exited with code 0(0x0).