From 5850d4882306553c977a33b44b2c29dbbfece5d1 Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 25 Aug 2011 07:33:56 +0000 Subject: [PATCH] win32: fix context menus to use rightclicks in context menus correctly --- src/drivers/win/cheat.cpp | 4 ++-- src/drivers/win/debugger.cpp | 4 ++-- src/drivers/win/memview.cpp | 2 +- src/drivers/win/tasedit.cpp | 2 +- src/drivers/win/window.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/drivers/win/cheat.cpp b/src/drivers/win/cheat.cpp index c97d0afa..a9047952 100644 --- a/src/drivers/win/cheat.cpp +++ b/src/drivers/win/cheat.cpp @@ -363,10 +363,10 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l hCheatcontextsub = GetSubMenu(hCheatcontext,0); if (lParam != -1) - TrackPopupMenu(hCheatcontextsub,0,LOWORD(lParam),HIWORD(lParam),TPM_RIGHTBUTTON,hwndDlg,0); //Create menu + TrackPopupMenu(hCheatcontextsub,TPM_RIGHTBUTTON,LOWORD(lParam),HIWORD(lParam),0,hwndDlg,0); //Create menu else { // Handle the context menu keyboard key GetWindowRect(GetDlgItem(hwndDlg,IDC_LIST_CHEATS), &wrect); - TrackPopupMenu(hCheatcontextsub,0,wrect.left + int((wrect.right - wrect.left) / 3),wrect.top + int((wrect.bottom - wrect.top) / 3),TPM_RIGHTBUTTON,hwndDlg,0); //Create menu + TrackPopupMenu(hCheatcontextsub,TPM_RIGHTBUTTON,wrect.left + int((wrect.right - wrect.left) / 3),wrect.top + int((wrect.bottom - wrect.top) / 3),0,hwndDlg,0); //Create menu } } diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 5e95bf67..0023fb0b 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -1196,10 +1196,10 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara hDebugcontextsub = GetSubMenu(hDebugcontext,0); if (lParam != -1) - TrackPopupMenu(hDebugcontextsub,0,LOWORD(lParam),HIWORD(lParam),TPM_RIGHTBUTTON,hwndDlg,0); //Create menu + TrackPopupMenu(hDebugcontextsub,TPM_RIGHTBUTTON,LOWORD(lParam),HIWORD(lParam),0,hwndDlg,0); //Create menu else { // Handle the context menu keyboard key GetWindowRect(GetDlgItem(hwndDlg,IDC_DEBUGGER_BP_LIST), &wrect); - TrackPopupMenu(hDebugcontextsub,0,wrect.left + int((wrect.right - wrect.left) / 3),wrect.top + int((wrect.bottom - wrect.top) / 3),TPM_RIGHTBUTTON,hwndDlg,0); //Create menu + TrackPopupMenu(hDebugcontextsub,TPM_RIGHTBUTTON,wrect.left + int((wrect.right - wrect.left) / 3),wrect.top + int((wrect.bottom - wrect.top) / 3),0,hwndDlg,0); //Create menu } } diff --git a/src/drivers/win/memview.cpp b/src/drivers/win/memview.cpp index 7877d7b9..6e0557c6 100644 --- a/src/drivers/win/memview.cpp +++ b/src/drivers/win/memview.cpp @@ -1304,7 +1304,7 @@ LRESULT CALLBACK MemViewCallB(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa InsertMenuItem(hMenu,i+1,1,&MenuInfo); } } - if(i != 0)i = TrackPopupMenuEx(hMenu, TPM_RETURNCMD, x, y, hMemView, NULL); + if(i != 0)i = TrackPopupMenuEx(hMenu, TPM_RETURNCMD | TPM_RIGHTBUTTON, x, y, hMemView, NULL); switch(i){ case ID_ADDRESS_FRZ_TOGGLE_STATE: // ################################## Start of SP CODE ########################### diff --git a/src/drivers/win/tasedit.cpp b/src/drivers/win/tasedit.cpp index eeb4f163..78e40a8a 100644 --- a/src/drivers/win/tasedit.cpp +++ b/src/drivers/win/tasedit.cpp @@ -198,7 +198,7 @@ enum ECONTEXTMENU void ShowMenu(ECONTEXTMENU which, POINT& pt) { HMENU sub = GetSubMenu(hrmenu,(int)which); - TrackPopupMenu(sub,0,pt.x,pt.y,TPM_RIGHTBUTTON,hwndTasEdit,0); + TrackPopupMenu(sub,TPM_RIGHTBUTTON,pt.x,pt.y,0,hwndTasEdit,0); } void StrayClickMenu(LPNMITEMACTIVATE info) diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index 0372cdc0..7f970cc1 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -1296,7 +1296,7 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) pt.x = LOWORD(lParam); //Get mouse x in terms of client area pt.y = HIWORD(lParam); //Get mouse y in terms of client area ClientToScreen(hAppWnd, (LPPOINT) &pt); //Convert client area x,y to screen x,y - TrackPopupMenu(hfceuxcontextsub,0,(pt.x),(pt.y),TPM_RIGHTBUTTON,hWnd,0); //Create menu + TrackPopupMenu(hfceuxcontextsub,TPM_RIGHTBUTTON,(pt.x),(pt.y),0,hWnd,0); //Create menu } else {