《深入浅出mfc》的问题~
《深入浅出mfc》里边讲的的CMyWinApp的成员函数initinstance()函数里边有一句是m_pMainWnd=newcframewnd(),这句我在mfc程序...
《深入浅出mfc》里边讲的的CMyWinApp的成员函数initinstance()函数里边有一句是m_pMainWnd=new cframewnd(),这句我在mfc程序里边怎么没找到???BOOL CMymfcApp::InitInstance(){ AfxEnableControlContainer(); // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need.#ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL#else Enable3dControlsStatic(); // Call this when linking to MFC statically#endif // Change the registry key under which our settings are stored. // TODO: You should modify this string to be something appropriate // such as the name of your company or organization. SetRegistryKey(_T("Local AppWizard-Generated Applications")); LoadStdProfileSettings(); // Load standard INI file options (including MRU) // Register the application's document templates. Document templates // serve as the connection between documents, frame windows and views. CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CMymfcDoc), RUNTIME_CLASS(CMainFrame), // main SDI frame window RUNTIME_CLASS(CMymfcView)); AddDocTemplate(pDocTemplate); // Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); // Dispatch commands specified on the command line if (!ProcessShellCommand(cmdInfo)) return FALSE; // The one and only window has been initialized, so show and update it. m_pMainWnd->ShowWindow(SW_SHOW); m_pMainWnd->UpdateWindow(); return TRUE;}
展开
2个回答
展开全部
CSingleDocTemplate* pDocTemplate; pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CMymfcDoc),
RUNTIME_CLASS(CMainFrame), //这里 注册了主窗口动态创建类。
RUNTIME_CLASS(CMymfcView));
if (!ProcessShellCommand(cmdInfo)) return FALSE; // 在这个函数里根据不同的命令行参数动态创建的。
RUNTIME_CLASS(CMainFrame), //这里 注册了主窗口动态创建类。
RUNTIME_CLASS(CMymfcView));
if (!ProcessShellCommand(cmdInfo)) return FALSE; // 在这个函数里根据不同的命令行参数动态创建的。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询