comctl32: Added context menu to treeview.
This commit is contained in:
parent
490e0029ea
commit
f18b428ccf
|
@ -4160,6 +4160,21 @@ TREEVIEW_RButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue