// 2DFaceApp.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include <2DFaceApp.h> #include "OCC_MainFrame.h" #include "OCC_2dChildFrame.h" #include "2DFaceDoc.h" #include "OCC_2dView.h" ///////////////////////////////////////////////////////////////////////////// // C2DFaceApp construction C2DFaceApp::C2DFaceApp() { SampleName = "2DFace"; //for about dialog SetSamplePath("03_2DSamples\\03_7_2DFace"); } ///////////////////////////////////////////////////////////////////////////// // The one and only C2DFaceApp object C2DFaceApp theApp; ///////////////////////////////////////////////////////////////////////////// // C2DFaceApp initialization BOOL C2DFaceApp::InitInstance() { // 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. 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. CMultiDocTemplate* pDocTemplate; pDocTemplate = new CMultiDocTemplate( IDR_2DTYPE, RUNTIME_CLASS(C2DFaceDoc), RUNTIME_CLASS(OCC_2dChildFrame), RUNTIME_CLASS(OCC_2dView)); AddDocTemplate(pDocTemplate); // create main MDI Frame window OCC_MainFrame* pMainFrame = new OCC_MainFrame; if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE; m_pMainWnd = pMainFrame; // 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 main window has been initialized, so show and update it. pMainFrame->ShowWindow(m_nCmdShow); pMainFrame->UpdateWindow(); return TRUE; }