Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / WCE samples / Simple / main.cpp
1 ///////////////////////////////////////\r
2 // main.cpp\r
3 \r
4 #include "SimpleApp.h"\r
5 #include "resource.h"\r
6 \r
7 \r
8 INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, int)\r
9 {\r
10         TCHAR szBuf[MAX_STRING_SIZE];\r
11         ::LoadString(hInstance, IDW_MAIN, szBuf, MAX_STRING_SIZE -1);\r
12         HWND hWnd = FindWindow(szBuf, NULL);\r
13 \r
14         // If application is already running, restore it and quit\r
15         if (hWnd)\r
16         {\r
17                 SetForegroundWindow ((HWND)(((DWORD)hWnd) | 0x01));\r
18                 TRACE(_T("Application Already running"));\r
19                 return -1;\r
20         }\r
21 \r
22         //Start the framework\r
23     CSimpleApp MyApp;\r
24 \r
25     //Process the window messages\r
26     return MyApp.Run();\r
27 }\r

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