在你的应用程序类的InitInstance()函数中如此这般就可以了BOOL CSecuritylibApp::InitInstance() { AfxEnableControlContainer(); AfxInitRichEdit(); // 加上这句就可以了 #ifdef _AFXDLL Enable3dControls(); #else Enable3dControlsStatic(); #endif CSecuritylibDlg 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 } return FALSE; }
{
AfxEnableControlContainer(); AfxInitRichEdit(); // 加上这句就可以了
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif CSecuritylibDlg 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
} return FALSE;
}
至于为什么可能这种控健比较特别,需要初始化很多东西,
如果什么程序都自动初始化,就显得有些浪费了,
可能也许是别的原因。