Информатика и программирование: Visual C++ с использованием библиотеки MFC. Дербакова Е.П. - 41 стр.

UptoLike

Составители: 

41
// Register the application's document tem-
plates. Document templates
// serve as the connection between docu-
ments, frame windows and views.
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CNewprjDoc),
RUNTIME_CLASS(CMainFrame),
// main SDI frame window
RUNTIME_CLASS(CNewprjView));
AddDocTemplate(pDocTemplate);
// Parse command line for standard shell
commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the com-
mand line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
// The one and only window has been initial-
ized, so show and update it.
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
       // Register the application's document tem-
plates. Document templates
       // serve as the connection between docu-
ments, frame windows and views.

      CSingleDocTemplate* pDocTemplate;
      pDocTemplate = new CSingleDocTemplate(
             IDR_MAINFRAME,
             RUNTIME_CLASS(CNewprjDoc),
             RUNTIME_CLASS(CMainFrame),
// main SDI frame window
             RUNTIME_CLASS(CNewprjView));
      AddDocTemplate(pDocTemplate);

    // Parse command line for standard shell
commands, DDE, file open
    CCommandLineInfo cmdInfo;
    ParseCommandLine(cmdInfo);

     // Dispatch commands specified on the com-
mand line
     if (!ProcessShellCommand(cmdInfo))
            return FALSE;

       // The one and only window has been initial-
ized, so show and update it.
       m_pMainWnd->ShowWindow(SW_SHOW);
       m_pMainWnd->UpdateWindow();

                         41