1 ///////////////////////////////////////
\r
4 #include "SubclassApp.h"
\r
5 #include "resource.h"
\r
7 INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, int)
\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
22 CSubclassApp theApp;
\r
24 // Process the window messages
\r
25 return theApp.Run();
\r