Commit f18b428c authored by Gregor Brunmar's avatar Gregor Brunmar Committed by Alexandre Julliard

comctl32: Added context menu to treeview.

parent 490e0029
......@@ -4160,6 +4160,21 @@ TREEVIEW_RButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
static LRESULT
TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
{
TVHITTESTINFO ht;
ht.pt = *pPt;
TREEVIEW_HitTest(infoPtr, &ht);
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));
}
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment