diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 172514f0b6..5adea43870 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2449,6 +2449,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) wxTreeEvent nevent(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, GetId()); nevent.m_item = (long) item; nevent.m_code = 0; + nevent.m_pointDrag = wxPoint(x, y); nevent.SetEventObject(this); GetEventHandler()->ProcessEvent(nevent); } @@ -2501,6 +2502,7 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) wxTreeEvent nevent( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, GetId() ); nevent.m_item = (long) item; nevent.m_code = 0; + nevent.m_pointDrag = wxPoint(x, y); nevent.SetEventObject( this ); GetEventHandler()->ProcessEvent( nevent ); } diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index d4995dd32f..58a84c5ac4 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2225,6 +2225,9 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) 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;