// 2DDisplayApp.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "2DDisplayApp.h" #include "OCC_MainFrame.h" #include "OCC_2dChildFrame.h" #include "2DDisplayDoc.h" #include "OCC_2dView.h" ///////////////////////////////////////////////////////////////////////////// // C2DDisplayApp construction C2DDisplayApp::C2DDisplayApp() { SampleName = "2DDisplay"; //for about dialog } ///////////////////////////////////////////////////////////////////////////// // The one and only C2DDisplayApp object C2DDisplayApp theApp; ///////////////////////////////////////////////////////////////////////////// // C2DDisplayApp initialization BOOL C2DDisplayApp::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(C2DDisplayDoc), 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; }