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

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