X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c47addef107f756f1a342d2f3f8d432e784691a2..503602dfe7fd468159d8d563657ad10c0bf6601f:/src/msw/treectrl.cpp diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 23722d24ec..6bc4c2341c 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2241,15 +2241,15 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara WXLRESULT rc = 0; bool isMultiple = (GetWindowStyle() & wxTR_MULTIPLE) != 0; -#if (!defined(_WIN32_WCE)) || (defined(_WIN32_WCE) && (_WIN32_WCE >= 400)) - if (nMsg == WM_CONTEXTMENU) +#ifdef WM_CONTEXTMENU + 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 ( GetEventHandler()->ProcessEvent(event) ) + return true; + //else: continue with generating wxEVT_CONTEXT_MENU in base class code } #endif // __SMARTPHONE__