Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / Explorer / src / ExplorerApp.cpp
diff --git a/research/transmission_spectroscopy/TOF/Win32++/samples/Explorer/src/ExplorerApp.cpp b/research/transmission_spectroscopy/TOF/Win32++/samples/Explorer/src/ExplorerApp.cpp
new file mode 100644 (file)
index 0000000..cb48cea
--- /dev/null
@@ -0,0 +1,38 @@
+///////////////////////////////////////////////\r
+//ExplorerApp.cpp -  Definitions for the CExplorerApp class\r
+\r
+#include "stdafx.h"\r
+#include "ExplorerApp.h"\r
+#include "resource.h"\r
+\r
+\r
+CExplorerApp::CExplorerApp()\r
+{\r
+}\r
+\r
+CExplorerApp::~CExplorerApp()\r
+{\r
+       ::CoUninitialize(); // Shut down COM\r
+}\r
+\r
+BOOL CExplorerApp::InitInstance()\r
+{\r
+       // Initialise COM\r
+       if (FAILED(CoInitialize(NULL)))\r
+       {\r
+               ::MessageBox(NULL, _T("Failed to initialize COM"), _T("ERROR"), MB_ICONERROR);\r
+               return FALSE;\r
+       }\r
+       \r
+       //Create the Frame Window\r
+       if (!m_Frame.Create())\r
+       {\r
+               // We get here if the Frame creation fails\r
+\r
+               ::MessageBox(NULL, _T("Failed to create Frame window"), _T("ERROR"), MB_ICONERROR);\r
+               return FALSE; // returning FALSE ends the application\r
+       }\r
+\r
+       return TRUE;\r
+}\r
+\r

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