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

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