1 ///////////////////////////////////////
\r
4 #include "DialogApp.h"
\r
7 INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int iCmdShow)
\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
13 // If application is already running, restore it and quit
\r
16 SetForegroundWindow ((HWND)(((DWORD)hWnd) | 0x01));
\r
17 TRACE(_T("Application Already running"));
\r
21 // The one and only CDialogApp object
\r
24 //Process the window messages
\r
25 return theApp.Run();
\r