mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 23:55:07 +00:00
[DEVMGR]
Select a treeview item on a right click. svn path=/trunk/; revision=73850
This commit is contained in:
parent
f78f7b3f31
commit
dd588d8bb2
|
@ -128,10 +128,16 @@ CDeviceView::OnRightClick(
|
|||
_In_ LPNMHDR NmHdr
|
||||
)
|
||||
{
|
||||
HTREEITEM hItem = TreeView_GetNextItem(NmHdr->hwndFrom, 0, TVGN_DROPHILITE);
|
||||
if (hItem)
|
||||
TVHITTESTINFO hitInfo;
|
||||
HTREEITEM hItem;
|
||||
|
||||
GetCursorPos(&hitInfo.pt);
|
||||
ScreenToClient(m_hTreeView, &hitInfo.pt);
|
||||
|
||||
hItem = TreeView_HitTest(m_hTreeView, &hitInfo);
|
||||
if (hItem != NULL && (hitInfo.flags & (TVHT_ONITEM | TVHT_ONITEMICON)))
|
||||
{
|
||||
TreeView_SelectItem(NmHdr->hwndFrom, hItem);
|
||||
TreeView_SelectItem(m_hTreeView, hItem);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue