X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d35dce3a2e3ca417093eaa192f1e9e54e55a22ba..2334fef6eaf763bc0b9132a86cc57c395c85c557:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index ac8c5f927a..b74ae1f2ae 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2219,6 +2219,16 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara WXLRESULT rc = 0; bool isMultiple = (GetWindowStyle() & wxTR_MULTIPLE) != 0; + if (nMsg == WM_CONTEXTMENU) + { + wxTreeEvent event( wxEVT_COMMAND_TREE_ITEM_MENU, GetId() ); + event.m_item = GetSelection(); + event.SetEventObject( this ); + GetEventHandler()->ProcessEvent( event ); + + return rc; + } + if ( (nMsg >= WM_MOUSEFIRST) && (nMsg <= WM_MOUSELAST) ) { // we only process mouse messages here and these parameters have the