Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / new projects / main.cpp
1 ///////////////////////////////////\r
2 // main.cpp\r
3 \r
4 // To configure your project:\r
5 // 1) Add Win32++'s include directory to the project's additional include directories for C/C++\r
6 // 2) Add Win32++'s include directory to the project's additional include directories for Resources\r
7 \r
8 #include "wincore.h"\r
9 \r
10 \r
11 // A class that inherits from CWnd. It is used to create the window.\r
12 class CView : public CWnd\r
13 {\r
14 public:\r
15     CView() {}\r
16     virtual ~CView() {}\r
17     virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam)\r
18     {\r
19         switch (uMsg)\r
20         {\r
21         case WM_DESTROY:\r
22             //End the program when window is destroyed\r
23             ::PostQuitMessage(0);\r
24             break;\r
25         }\r
26 \r
27         //Use the default message handling for remaining messages\r
28         return WndProcDefault(uMsg, wParam, lParam);\r
29     }\r
30 };\r
31 \r
32 \r
33 int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR, int)\r
34 {\r
35     // Start Win32++\r
36     CWinApp MyApp;\r
37         \r
38     // Create our view window\r
39     CView m_View;\r
40     m_View.Create();\r
41 \r
42     // Run the application's message loop\r
43     return MyApp.Run();\r
44 }\r

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