comctl32/treeview: Send WM_CONTEXTMENU everywhere, not just over items.

This commit is contained in:
Daniel Jelinski 2012-07-13 20:42:33 +02:00 committed by Alexandre Julliard
parent 602dea1e12
commit c7212f8262
1 changed files with 5 additions and 10 deletions

View File

@ -4274,17 +4274,12 @@ TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
ht.pt = *pPt;
TREEVIEW_HitTest(infoPtr, &ht);
/* Change to screen coordinate for WM_CONTEXTMENU */
ClientToScreen(infoPtr->hwnd, &ht.pt);
if (ht.hItem)
{
/* Change to screen coordinate for WM_CONTEXTMENU */
ClientToScreen(infoPtr->hwnd, &ht.pt);
/* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
(WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
}
/* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
(WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
return 0;
}