7fd59977 |
1 | // TriangulationApp.cpp : Defines the class behaviors for the application. |
2 | // |
3 | |
4 | #include "stdafx.h" |
5 | |
6 | #include "TriangulationApp.h" |
7 | |
8 | #include "OCC_MainFrame.h" |
9 | #include "OCC_3dChildFrame.h" |
10 | #include "TriangulationDoc.h" |
11 | #include "OCC_3dView.h" |
12 | |
13 | ///////////////////////////////////////////////////////////////////////////// |
14 | // CTriangulationApp construction |
15 | |
5c1f974e |
16 | CTriangulationApp::CTriangulationApp() : OCC_App() |
7fd59977 |
17 | { |
5c1f974e |
18 | SampleName = "TopologyTriangulation"; //for about dialog |
7fd59977 |
19 | } |
20 | |
21 | ///////////////////////////////////////////////////////////////////////////// |
22 | // The one and only CTriangulationApp object |
23 | |
24 | CTriangulationApp theApp; |
25 | |
26 | ///////////////////////////////////////////////////////////////////////////// |
27 | // CTriangulationApp initialization |
28 | |
29 | BOOL CTriangulationApp::InitInstance() |
30 | { |
31 | AfxEnableControlContainer(); |
32 | |
33 | // Standard initialization |
34 | // If you are not using these features and wish to reduce the size |
35 | // of your final executable, you should remove from the following |
36 | // the specific initialization routines you do not need. |
37 | |
38 | // Change the registry key under which our settings are stored. |
39 | // You should modify this string to be something appropriate |
40 | // such as the name of your company or organization. |
41 | SetRegistryKey(_T("Local AppWizard-Generated Applications")); |
42 | |
43 | LoadStdProfileSettings(); // Load standard INI file options (including MRU) |
44 | |
45 | // Register the application's document templates. Document templates |
46 | // serve as the connection between documents, frame windows and views. |
47 | |
48 | CMultiDocTemplate* pDocTemplate; |
49 | pDocTemplate = new CMultiDocTemplate( |
50 | IDR_3DTYPE, |
51 | RUNTIME_CLASS(CTriangulationDoc), |
52 | RUNTIME_CLASS(OCC_3dChildFrame), // custom MDI child frame |
53 | RUNTIME_CLASS(OCC_3dView)); |
54 | AddDocTemplate(pDocTemplate); |
55 | |
56 | // create main MDI Frame window |
57 | OCC_MainFrame* pMainFrame = new OCC_MainFrame(with_AIS_TB); |
58 | if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) |
59 | return FALSE; |
60 | m_pMainWnd = pMainFrame; |
61 | |
62 | // Parse command line for standard shell commands, DDE, file open |
63 | CCommandLineInfo cmdInfo; |
64 | ParseCommandLine(cmdInfo); |
65 | |
66 | // Dispatch commands specified on the command line |
67 | if (!ProcessShellCommand(cmdInfo)) |
68 | return FALSE; |
69 | |
70 | // The main window has been initialized, so show and update it. |
71 | pMainFrame->ShowWindow(m_nCmdShow); |
72 | pMainFrame->UpdateWindow(); |
73 | |
74 | return TRUE; |
75 | } |
76 | |