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

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