更换打开程序的第一个对话框,需要在APP类中进行,在CmyApp.cpp文件中的InitInstance函数中,修改创建主对话框的类名即可。
CMainDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
修改第一行的CMainDlg类名即可。