/*
* ReactOS Task Manager
*
- * TaskMgr.c : Defines the entry point for the application.
+ * taskmgr.c : Defines the entry point for the application.
*
* Copyright (C) 1999 - 2001 Brian Palmer <brianp@reactos.org>
* 2005 Klemens Friedl <frik85@reactos.at>
case WM_MENUSELECT:
TaskManager_OnMenuSelect(hDlg, LOWORD(wParam), HIWORD(wParam), (HMENU)lParam);
break;
+ case WM_SYSCOLORCHANGE:
+ /* Forward WM_SYSCOLORCHANGE to common controls */
+ SendMessage(hApplicationPageListCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hProcessPageListCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ SendMessage(hProcessPageHeaderCtrl, WM_SYSCOLORCHANGE, 0, 0);
+ break;
}
return 0;
SetUpdateSpeed(hMainWnd);
}
-void TaskManager_OnViewRefresh(void)
-{
- PostMessageW(hMainWnd, WM_TIMER, 0, 0);
-}
-
void TaskManager_OnTabWndSelChange(void)
{
int i;
}
return lpszBuf;
}
+
+DWORD EndLocalThread(HANDLE *hThread, DWORD dwThread)
+{
+ DWORD dwExitCodeThread = 0;
+
+ if (*hThread != NULL) {
+ PostThreadMessage(dwThread,WM_QUIT,0,0);
+ for (;;) {
+ MSG msg;
+
+ if (WAIT_OBJECT_0 == WaitForSingleObject(*hThread, 500))
+ break;
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+ GetExitCodeThread(*hThread, &dwExitCodeThread);
+ CloseHandle(*hThread);
+ *hThread = NULL;
+ }
+ return dwExitCodeThread;
+}
+