Index: wxWidgets-2.9/include/wx/msw/treectrl.h
===================================================================
--- wxWidgets-2.9/include/wx/msw/treectrl.h	(revision 59478)
+++ wxWidgets-2.9/include/wx/msw/treectrl.h	(working copy)
@@ -109,6 +109,11 @@
                                          const wxColour& col);
     virtual void SetItemFont(const wxTreeItemId& item, const wxFont& font);
 
+    // implement base class overrides
+    // ------------------------------
+
+    virtual void SetFocus();
+
     // item status inquiries
     // ---------------------
 
@@ -303,6 +308,9 @@
     // whether focus was lost between subsequent clicks of a single item
     bool m_focusLost;
 
+    // whether we are in the process of setting focus to the control
+    bool m_settingFocus;
+
     // whether we need to trigger a state image click event
     bool m_triggerStateImageClick;
 
Index: wxWidgets-2.9/src/msw/treectrl.cpp
===================================================================
--- wxWidgets-2.9/src/msw/treectrl.cpp	(revision 59478)
+++ wxWidgets-2.9/src/msw/treectrl.cpp	(working copy)
@@ -724,6 +724,7 @@
     m_pVirtualRoot = NULL;
     m_dragStarted = false;
     m_focusLost = true;
+    m_settingFocus = false;
     m_triggerStateImageClick = false;
 
     // initialize the global array of events now as it can't be done statically
@@ -1231,6 +1232,17 @@
 }
 
 // ----------------------------------------------------------------------------
+// Base class overrides
+// ----------------------------------------------------------------------------
+
+void wxTreeCtrl::SetFocus()
+{
+    m_settingFocus = true;
+    wxWindow::SetFocus();
+    m_settingFocus = false;
+}
+
+// ----------------------------------------------------------------------------
 // Item status
 // ----------------------------------------------------------------------------
 
@@ -3357,8 +3369,17 @@
 
         case TVN_SELCHANGINGA:
         case TVN_SELCHANGINGW:
-            if ( !HasFlag(wxTR_MULTIPLE) )
+            if ( HasFlag(wxTR_MULTIPLE) )
             {
+                // do not allow selection changes when setting focus
+                if ( eventType == wxEVT_NULL && m_settingFocus )
+                {
+                    *result = true;
+                    return true;
+                }
+            }
+            else
+            {
                 if ( eventType == wxEVT_NULL )
                     eventType = wxEVT_COMMAND_TREE_SEL_CHANGING;
                 //else: already set above
