BOOL WindowsApp::InitInstance() { // Standard initialization #if _MFC_VER < 0x0700 #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif #endif // Change the registry key under which our settings are stored. SetRegistryKey(_T("Local AppWizard-Generated Applications")); // Qt initialization QMfcApp::instance(this); MainFrame* pFrame = new MainFrame; m_pMainWnd = pFrame; // create and load the frame with its resources pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); pFrame->ShowWindow(SW_SHOW); pFrame->UpdateWindow(); return true; }