请教 afxwin1.inl中ASSERT(afxCurrentResourceHandle != NULL);的问题
想用开源的测试框架提供的DLL搭建测试环境,编译时无问题,运行时候报错
BOOL CUdiskUpgradeTestApp::InitInstance(){ INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinApp::InitInstance(); AfxEnableControlContainer(); SetRegistryKey(_T("应用程序向导生成的本地应用程序"));// CUdiskUpgradeTestDlg dlg;// m_pMainWnd = &dlg;// INT_PTR nResponse = dlg.DoModal();// if (nResponse == IDOK)// { // TODO: 在此处放置处理何时用“确定”来关闭 // 对话框的代码// }// else if (nResponse == IDCANCEL)// { // TODO: 在此放置处理何时用“取消”来关闭 // 对话框的代码// } // 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序, // 而不是启动应用程序的消息泵。 GdiplusStartup(&m_GdiplusToken, &m_GdiplusStartupInput, NULL); CppUnit::MfcUi::TestRunner runner; CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry(); runner.addTest(registry.makeTest()); runner.run(); //show UI return FALSE;}