mirror of
https://github.com/reactos/reactos.git
synced 2026-06-01 08:50:24 +08:00
[DEVMGR] Ensure clicking on item when opening property sheet (#4196)
Fix a bug related to the device manager, where double-clicking anywhere when an item is already selected opens the property sheet. CORE-17207
This commit is contained in:
committed by
GitHub
parent
dc483bd700
commit
5831427ef9
@@ -124,6 +124,27 @@ CDeviceView::OnSize(
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT
|
||||
CDeviceView::OnDoubleClick(
|
||||
_In_ LPNMHDR NmHdr
|
||||
)
|
||||
{
|
||||
TVHITTESTINFO hitInfo;
|
||||
HTREEITEM hItem;
|
||||
|
||||
GetCursorPos(&hitInfo.pt);
|
||||
ScreenToClient(m_hTreeView, &hitInfo.pt);
|
||||
|
||||
// Check if we are trying to double click an item
|
||||
hItem = TreeView_HitTest(m_hTreeView, &hitInfo);
|
||||
if (hItem != NULL && (hitInfo.flags & (TVHT_ONITEM | TVHT_ONITEMICON)))
|
||||
{
|
||||
DisplayPropertySheet();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT
|
||||
CDeviceView::OnRightClick(
|
||||
_In_ LPNMHDR NmHdr
|
||||
|
||||
Reference in New Issue
Block a user