From f60f345d3083cde0e12ed1ffc2ac57f1714cfa38 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Thu, 17 Mar 2005 13:17:05 +0000 Subject: [PATCH] - Don't try to kill non-existing timers. - Close dialog using EndDialog instead of DestroyWindow. svn path=/trunk/; revision=14160 --- reactos/subsys/system/taskmgr/taskmgr.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/reactos/subsys/system/taskmgr/taskmgr.c b/reactos/subsys/system/taskmgr/taskmgr.c index ccb3648c5da..abae3b83301 100644 --- a/reactos/subsys/system/taskmgr/taskmgr.c +++ b/reactos/subsys/system/taskmgr/taskmgr.c @@ -257,7 +257,7 @@ TaskManagerWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) OnAbout(); break; case ID_FILE_EXIT: - DestroyWindow(hDlg); + EndDialog(hDlg, IDOK); break; } break; @@ -590,23 +590,12 @@ BOOL OnCreate(HWND hWnd) TabCtrl_SetCurFocus/*Sel*/(hTabWnd, 2); TabCtrl_SetCurFocus/*Sel*/(hTabWnd, nActivePage); - if (TaskManagerSettings.UpdateSpeed == 0) - KillTimer(hWnd, 1); - else if (TaskManagerSettings.UpdateSpeed == 1) - { - KillTimer(hWnd, 1); + if (TaskManagerSettings.UpdateSpeed == 1) SetTimer(hWnd, 1, 1000, NULL); - } else if (TaskManagerSettings.UpdateSpeed == 2) - { - KillTimer(hWnd, 1); SetTimer(hWnd, 1, 2000, NULL); - } else if (TaskManagerSettings.UpdateSpeed == 4) - { - KillTimer(hWnd, 1); SetTimer(hWnd, 1, 4000, NULL); - } /* * Refresh the performance data