Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / Explorer / src / ExplorerApp.cpp
1 ///////////////////////////////////////////////\r
2 //ExplorerApp.cpp -  Definitions for the CExplorerApp class\r
3 \r
4 #include "stdafx.h"\r
5 #include "ExplorerApp.h"\r
6 #include "resource.h"\r
7 \r
8 \r
9 CExplorerApp::CExplorerApp()\r
10 {\r
11 }\r
12 \r
13 CExplorerApp::~CExplorerApp()\r
14 {\r
15         ::CoUninitialize(); // Shut down COM\r
16 }\r
17 \r
18 BOOL CExplorerApp::InitInstance()\r
19 {\r
20         // Initialise COM\r
21         if (FAILED(CoInitialize(NULL)))\r
22         {\r
23                 ::MessageBox(NULL, _T("Failed to initialize COM"), _T("ERROR"), MB_ICONERROR);\r
24                 return FALSE;\r
25         }\r
26         \r
27         //Create the Frame Window\r
28         if (!m_Frame.Create())\r
29         {\r
30                 // We get here if the Frame creation fails\r
31 \r
32                 ::MessageBox(NULL, _T("Failed to create Frame window"), _T("ERROR"), MB_ICONERROR);\r
33                 return FALSE; // returning FALSE ends the application\r
34         }\r
35 \r
36         return TRUE;\r
37 }\r
38 \r

UCC git Repository :: git.ucc.asn.au