From 968df75ae2f6f024a35fa64fe399dac12930e07c Mon Sep 17 00:00:00 2001 From: wj32 Date: Tue, 19 Jan 2010 00:02:14 +0000 Subject: [PATCH] fixed thread stack dialog - use IDCANCEL for proper Esc and X button support git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2673 21ef857c-d57f-4fe0-8362-d861dc6d29cd --- 2.x/trunk/ProcessHacker/ProcessHacker.rc | 2 +- 2.x/trunk/ProcessHacker/thrdstk.c | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/2.x/trunk/ProcessHacker/ProcessHacker.rc b/2.x/trunk/ProcessHacker/ProcessHacker.rc index da830bda3..4666f1af6 100644 --- a/2.x/trunk/ProcessHacker/ProcessHacker.rc +++ b/2.x/trunk/ProcessHacker/ProcessHacker.rc @@ -287,7 +287,7 @@ CAPTION "Thread Stack" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN CONTROL "",IDC_THRDSTACK_LIST,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,7,7,247,196 - PUSHBUTTON "Close",IDCLOSE,204,207,50,14 + PUSHBUTTON "Close",IDOK,204,207,50,14 PUSHBUTTON "Refresh",IDC_REFRESH,150,207,50,14 END diff --git a/2.x/trunk/ProcessHacker/thrdstk.c b/2.x/trunk/ProcessHacker/thrdstk.c index f27c3035d..c5593e320 100644 --- a/2.x/trunk/ProcessHacker/thrdstk.c +++ b/2.x/trunk/ProcessHacker/thrdstk.c @@ -140,8 +140,9 @@ static INT_PTR CALLBACK PhpThreadStackDlgProc( switch (id) { - case IDCLOSE: - EndDialog(hwndDlg, IDCLOSE); + case IDCANCEL: // Esc and X button to close + case IDOK: + EndDialog(hwndDlg, IDOK); break; case IDC_REFRESH: { @@ -153,16 +154,6 @@ static INT_PTR CALLBACK PhpThreadStackDlgProc( } } break; - case WM_SYSCOMMAND: - { - switch (wParam) - { - case SC_CLOSE: - EndDialog(hwndDlg, IDCLOSE); - break; - } - } - break; case WM_SIZE: { PPH_LAYOUT_MANAGER layoutManager;