Implemented the behavior of sending WM_CONTEXTMENU when receiving a

WM_RBUTTONUP.
This commit is contained in:
Pascal Lessard 2000-02-29 22:04:00 +00:00 committed by Alexandre Julliard
parent 8eba5c2a21
commit ce527de51f

View file

@ -1382,7 +1382,22 @@ HEADER_Paint (HWND hwnd, WPARAM wParam)
static LRESULT
HEADER_RButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
return HEADER_SendSimpleNotify (hwnd, NM_RCLICK);
BOOL bRet;
POINT pt;
pt.x = LOWORD(lParam);
pt.y = HIWORD(lParam);
/* Send a Notify message */
bRet = HEADER_SendSimpleNotify (hwnd, NM_RCLICK);
/* Change to screen coordinate for WM_CONTEXTMENU */
ClientToScreen(hwnd, &pt);
/* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
SendMessageA( hwnd, WM_CONTEXTMENU, (WPARAM) hwnd, MAKELPARAM(pt.x, pt.y));
return bRet;
}