1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| BOOL CHungDlg::ProcessRunStatus(HWND hwnd) { HINSTANCE hDll = LoadLibrary(_T("user32.dll")); if (NULL != hDll) { typedef BOOL(WINAPI *PROCISHUNGAPPWINDOW)(HWND); PROCISHUNGAPPWINDOW IsHungAppWindow = (PROCISHUNGAPPWINDOW)GetProcAddress(hDll, "IsHungAppWindow"); if (IsHungAppWindow(hwnd)) { MessageBox("未响应"); CloseApp(hwnd); return FALSE; } else { MessageBox("正在运行"); return TRUE; } } return FALSE; }
|