X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f31a409829d5d410f38e64896470afcaff12635b..2a1f999fafa4312ccd47b7be65c672c2220fea36:/src/msw/treectrl.cpp?ds=inline diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 53d205ed73..8250f48782 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -659,7 +659,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, if ( m_windowStyle & wxTR_FULL_ROW_HIGHLIGHT ) { - if ( wxTheApp->GetComCtl32Version() >= 471 ) + if ( wxApp::GetComCtl32Version() >= 471 ) wstyle |= TVS_FULLROWSELECT; } @@ -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__ @@ -2903,7 +2903,7 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) wxASSERT_MSG( !m_dragImage, _T("starting to drag once again?") ); m_dragImage = new wxDragImage(*this, event.m_item); - m_dragImage->BeginDrag(wxPoint(0, 0), this); + m_dragImage->BeginDrag(wxPoint(0,0), this); m_dragImage->Show(); } break;