Commit before breaking everything
[matches/honours.git] / research / transmission_spectroscopy / TOF / Win32++ / WCE samples / Dialog / main.cpp
diff --git a/research/transmission_spectroscopy/TOF/Win32++/WCE samples/Dialog/main.cpp b/research/transmission_spectroscopy/TOF/Win32++/WCE samples/Dialog/main.cpp
new file mode 100644 (file)
index 0000000..166a6b0
--- /dev/null
@@ -0,0 +1,27 @@
+///////////////////////////////////////\r
+// main.cpp\r
+\r
+#include "DialogApp.h"\r
+\r
+\r
+INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int iCmdShow)\r
+{\r
+       TCHAR szBuf[MAX_STRING_SIZE];\r
+       ::LoadString(hInstance, IDW_MAIN, szBuf, MAX_STRING_SIZE -1);\r
+       HWND hWnd = FindWindow(szBuf, NULL);\r
+\r
+       // If application is already running, restore it and quit\r
+       if (hWnd)\r
+       {\r
+               SetForegroundWindow ((HWND)(((DWORD)hWnd) | 0x01));\r
+               TRACE(_T("Application Already running"));\r
+               return -1;\r
+       }\r
+\r
+       // The one and only CDialogApp object\r
+       CDialogApp theApp;\r
+\r
+       //Process the window messages\r
+       return theApp.Run();\r
+}\r
+\r

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