正在阅读:明明白白看MFC之程序框架(二)明明白白看MFC之程序框架(二)

2004-04-19 15:32 出处:CSDN 作者:eliner 责任编辑:sdq

     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(CHelloWorldDoc),

            RUNTIME_CLASS(CMainFrame),       // main SDI frame window

            RUNTIME_CLASS(CHelloWorldView));

     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;

}

BOOL CWinApp::InitInstance()

{

     return TRUE;

}

键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品