]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
added XRC handler for wxStdDialogButtonSizer
[wxWidgets.git] / src / msw / treectrl.cpp
index 2a2bb3b124d954c622a037ff3cf422a662557259..6bc4c2341c8281218de92b6e052069020a15686f 100644 (file)
@@ -926,7 +926,7 @@ bool wxTreeCtrl::SetForegroundColour(const wxColour &colour)
 
 wxString wxTreeCtrl::GetItemText(const wxTreeItemId& item) const
 {
-    wxCHECK_MSG( item.IsOk(), wxT(""), wxT("invalid tree item") );
+    wxCHECK_MSG( item.IsOk(), wxEmptyString, wxT("invalid tree item") );
 
     wxChar buf[512];  // the size is arbitrary...
 
@@ -2241,15 +2241,15 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
     WXLRESULT rc = 0;
     bool isMultiple = (GetWindowStyle() & wxTR_MULTIPLE) != 0;
 
-#ifndef __SMARTPHONE__
-    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;