win32: fix context menus to use rightclicks in context menus correctly
This commit is contained in:
parent
dea31f040e
commit
5850d48823
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 ###########################
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue