From 08490144e89bee81d756cf16bf0ad1805ec9baaa Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Tue, 10 Jan 2006 23:48:33 +0000 Subject: [PATCH] Use WM_CONTEXTMENU for shortcut menu. Thanks Thomas :) svn path=/trunk/; revision=20775 --- reactos/subsys/system/servman/servman.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/reactos/subsys/system/servman/servman.c b/reactos/subsys/system/servman/servman.c index 17503ed604b..dc10abe8e11 100644 --- a/reactos/subsys/system/servman/servman.c +++ b/reactos/subsys/system/servman/servman.c @@ -236,17 +236,6 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) switch (((LPNMHDR) lParam)->code) { - case NM_RCLICK: - { - //item = (LPNMITEMACTIVATE) lParam; - //lpnmh = (LPNMHDR) lParam; - POINT pt; - - GetCursorPos(&pt); - TrackPopupMenuEx(hShortcutMenu, TPM_RIGHTBUTTON, pt.x, pt.y, hwnd, NULL); - } - break; - case NM_DBLCLK: item = (LPNMITEMACTIVATE) lParam; PropSheets(hwnd); @@ -316,8 +305,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) break; case WM_CLOSE: - /* free the service array */ - FreeMemory(); + FreeMemory(); /* free the service array */ DestroyMenu(hShortcutMenu); DestroyWindow(hwnd); break; @@ -326,6 +314,17 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) PostQuitMessage(0); break; + case WM_CONTEXTMENU: + { + int xPos, yPos; + + xPos = LOWORD(lParam); + yPos = HIWORD(lParam); + + TrackPopupMenuEx(hShortcutMenu, TPM_RIGHTBUTTON, xPos, yPos, hwnd, NULL); + } + break; + case WM_COMMAND: switch(LOWORD(wParam)) {