regedit: Only show the context menu if the mouse is over a treeitem.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ab0d0c6ee4
commit
6f667d1c42
|
@ -376,10 +376,11 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
TVHITTESTINFO ht;
|
||||
ht.pt = pt;
|
||||
ScreenToClient(g_pChildWnd->hTreeWnd, &ht.pt);
|
||||
if (SendMessageW(g_pChildWnd->hTreeWnd, TVM_HITTEST, 0, (LPARAM)&ht))
|
||||
if (SendMessageW(g_pChildWnd->hTreeWnd, TVM_HITTEST, 0, (LPARAM)&ht)) {
|
||||
SendMessageW(g_pChildWnd->hTreeWnd, TVM_SELECTITEM, TVGN_CARET, (LPARAM)ht.hItem);
|
||||
TrackPopupMenu(GetSubMenu(hPopupMenus, PM_NEW), TPM_RIGHTBUTTON,
|
||||
pt.x, pt.y, 0, hFrameWnd, NULL);
|
||||
TrackPopupMenu(GetSubMenu(hPopupMenus, PM_NEW), TPM_RIGHTBUTTON,
|
||||
pt.x, pt.y, 0, hFrameWnd, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
case WM_KEYDOWN:
|
||||
|
|
Loading…
Reference in New Issue