Author: ekohl
Date: Sun Feb 19 18:31:52 2017
New Revision: 73850
URL:
http://svn.reactos.org/svn/reactos?rev=73850&view=rev
Log:
[DEVMGR]
Select a treeview item on a right click.
Modified:
trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp
Modified: trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgmt/D…
==============================================================================
--- trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/devmgr/devmgmt/DeviceView.cpp [iso-8859-1] Sun Feb 19 18:31:52
2017
@@ -128,10 +128,16 @@
_In_ LPNMHDR NmHdr
)
{
- HTREEITEM hItem = TreeView_GetNextItem(NmHdr->hwndFrom, 0, TVGN_DROPHILITE);
- if (hItem)
- {
- TreeView_SelectItem(NmHdr->hwndFrom, 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(m_hTreeView, hItem);
}
return 0;