Курсовая работа: Текстовый редактор

pDocTemplate = new CMultiDocTemplate(IDR_EditAppTYPE,

RUNTIME_CLASS(CEditAppDoc),

RUNTIME_CLASS(CChildFrame), // custom MDI child frame

RUNTIME_CLASS(CEditAppView));

if (!pDocTemplate)

return FALSE;

AddDocTemplate(pDocTemplate);

// create main MDI Frame window

CMainFrame* pMainFrame = new CMainFrame;

if (!pMainFrame || !pMainFrame->LoadFrame(IDR_MAINFRAME))

{

delete pMainFrame;

return FALSE;

}

m_pMainWnd = pMainFrame;

// call DragAcceptFiles only if there's a suffix

// In an MDI app, this should occur immediately after setting m_pMainWnd

// Parse command line for standard shell commands, DDE, file open

CCommandLineInfo cmdInfo;

ParseCommandLine(cmdInfo);

// Dispatch commands specified on the command line. Will return FALSE if

// app was launched with /RegServer, /Register, /Unregserver or /Unregister.

if (!ProcessShellCommand(cmdInfo))

return FALSE;

// The main window has been initialized, so show and update it

pMainFrame->ShowWindow(m_nCmdShow);

pMainFrame->UpdateWindow();

return TRUE;

}

К-во Просмотров: 555
Бесплатно скачать Курсовая работа: Текстовый редактор