vc++6.0里面的简单问题。
来源:百度知道 编辑:UC知道 时间:2024/07/05 02:03:48
为什么我运行的时候第一个弹出的窗体是这个,而不是那个呢?
什么决定了这个窗体时第一个弹出?
什么决定了这个窗体时第一个弹出?
假定工程名为Dialog
在CDiaLogApp::InitInstance函数里有如下系统自动生成的代码
BOOL CDiaLogApp::InitInstance()
{
AfxEnableControlContainer();
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
CDiaLogDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}
int nResponse = dlg.DoModal();
这一句代码决定了哪个窗口先出现