Use WM_CONTEXTMENU for shortcut menu. Thanks Thomas :) Modified: trunk/reactos/subsys/system/servman/servman.c _____
Modified: trunk/reactos/subsys/system/servman/servman.c --- trunk/reactos/subsys/system/servman/servman.c 2006-01-10 23:29:29 UTC (rev 20774) +++ trunk/reactos/subsys/system/servman/servman.c 2006-01-10 23:48:33 UTC (rev 20775) @@ -236,17 +236,6 @@
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 @@ break;
case WM_CLOSE: - /* free the service array */ - FreeMemory(); + FreeMemory(); /* free the service array */ DestroyMenu(hShortcutMenu); DestroyWindow(hwnd); break; @@ -326,6 +314,17 @@ 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)) {