Merge branch 'master' of git.ucc.asn.au:/matches/honours
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / samples / FormDemo / src / FormApp.cpp
1 //////////////////////////////////////////////\r
2 // FormApp.cpp\r
3 \r
4 #include "stdafx.h"\r
5 #include "FormApp.h"\r
6 \r
7 \r
8 int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR, int)\r
9 {\r
10         try\r
11         {\r
12                 // Start Win32++\r
13                 CFormApp theApp;\r
14 \r
15                 // Run the application\r
16                 return theApp.Run();\r
17         }\r
18         \r
19         // catch all exceptions inherited from std::exception\r
20         catch (std::exception &e)\r
21         {\r
22                 // Process the exception and quit \r
23                 e.what();\r
24                 return -1;\r
25         }\r
26 }\r
27 \r
28 \r
29 // Definitions for the CFormApp class\r
30 CFormApp::CFormApp()\r
31 {\r
32 }\r
33 \r
34 CFormApp::~CFormApp()\r
35 {\r
36 }\r
37 \r
38 BOOL CFormApp::InitInstance()\r
39 {\r
40         //Create the Frame Window\r
41         m_Frame.Create();\r
42 \r
43         //End the program if the frame window creation fails\r
44         if (!m_Frame.GetHwnd())\r
45         {\r
46                 ::MessageBox(NULL, _T("Failed to create Frame window"), _T("ERROR"), MB_ICONERROR);\r
47                 return FALSE;\r
48         }\r
49 \r
50         return TRUE;\r
51 }\r
52 \r

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