BOOL IsRun (LPSTR szClassName, LPSTR szCaption) { HWND Hwnd;
Hwnd = FindWindow (szClassName,szCaption); if ((int)Hwnd > 0) { ShowWindow (Hwnd,SW_RESTORE); SetForegroundWindow (Hwnd); return TRUE; } return FALSE; } 在WinMain中IsRun ()