diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index 6f221e7294b57c6c9f88dc12b23c40856ff309b1..8a2b079570c19221d7563d0d7f382180928ff646 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -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; }