建议还是在CMyClassApp的initInstance()中显示设置对话框。这些对话框的设置保存在全局变量中,在申明主对话框后进行设置,然后显示。
或在对话框的初始化时利用全局变量进行设置(也可以在其他地方)。
目的就是在主窗口起来之前先起你要的窗口,你会在CMyClassApp的InitInstance()中看到如下代码!
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
/*
在这儿加入你要的东东!明白了吗!不明白给我
ozzman@163.net
*/
CCHARToASCDlg 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
}