Added item clicks event support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Unknown (CR) 1999-10-13 17:05:17 +00:00
parent 3995f8eb97
commit 84a6b8590b

View File

@ -1341,6 +1341,23 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
switch ( hdr->code )
{
case NM_RCLICK:
{
if ( wxControl::MSWOnNotify(idCtrl, lParam, result) )
return TRUE;
TV_HITTESTINFO tvhti;
::GetCursorPos(&(tvhti.pt));
::ScreenToClient(GetHwnd(),&(tvhti.pt));
if(TreeView_HitTest(GetHwnd(),&tvhti)!=NULL) {
if(tvhti.flags & TVHT_ONITEM) {
event.m_item = (WXHTREEITEM) tvhti.hItem;
eventType=wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK;
}
}
break;
}
case TVN_BEGINDRAG:
eventType = wxEVT_COMMAND_TREE_BEGIN_DRAG;
// fall through