Author: hbelusca
Date: Sun Jun 15 17:47:40 2014
New Revision: 63599
URL:
http://svn.reactos.org/svn/reactos?rev=63599&view=rev
Log:
[TASKMGR]: Use the EndTask API to kill tasks.
Modified:
trunk/reactos/base/applications/taskmgr/applpage.c
Modified: trunk/reactos/base/applications/taskmgr/applpage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
==============================================================================
--- trunk/reactos/base/applications/taskmgr/applpage.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/taskmgr/applpage.c [iso-8859-1] Sun Jun 15 17:47:40
2014
@@ -869,6 +869,9 @@
LV_ITEM item;
int i;
+ /* Trick: on Windows, pressing the CTRL key forces the task to be ended */
+ BOOL ForceEndTask = !!(GetKeyState(VK_CONTROL) & 0x8000);
+
for (i=0; i<ListView_GetItemCount(hApplicationPageListCtrl); i++) {
memset(&item, 0, sizeof(LV_ITEM));
item.mask = LVIF_STATE|LVIF_PARAM;
@@ -878,7 +881,7 @@
if (item.state & LVIS_SELECTED) {
pAPLI = (LPAPPLICATION_PAGE_LIST_ITEM)item.lParam;
if (pAPLI) {
- PostMessageW(pAPLI->hWnd, WM_CLOSE, 0, 0);
+ EndTask(pAPLI->hWnd, 0, ForceEndTask);
}
}
}