+ case NM_DBLCLK:
+ case NM_RCLICK:
+ {
+ TV_HITTESTINFO tvhti;
+ ::GetCursorPos(&tvhti.pt);
+ ::ScreenToClient(GetHwnd(), &tvhti.pt);
+ if ( TreeView_HitTest(GetHwnd(), &tvhti) )
+ {
+ if ( tvhti.flags & TVHT_ONITEM )
+ {
+ event.m_item = (WXHTREEITEM) tvhti.hItem;
+ eventType = (int)hdr->code == NM_DBLCLK
+ ? wxEVT_COMMAND_TREE_ITEM_ACTIVATED
+ : wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK;
+
+ event.m_pointDrag.x = tvhti.pt.x;
+ event.m_pointDrag.y = tvhti.pt.y;
+ }
+
+ break;
+ }
+ }
+ // fall through
+