]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
fix VC 7.x release build problems
[wxWidgets.git] / src / msw / treectrl.cpp
index d412e56ef7efbd7b6f55351293b891eaaf0c039d..5dcb0867c0c8e4c112dedaae6107c402c21efa02 100644 (file)
@@ -59,7 +59,7 @@
     #include "wx/msw/gnuwin32/extra.h"
 #endif
 
-#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
+#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) && !defined(__CYGWIN10__))
     #include <commctrl.h>
 #endif
 
@@ -1921,6 +1921,13 @@ bool wxTreeCtrl::GetBoundingRect(const wxTreeItemId& item,
                                  bool textOnly) const
 {
     RECT rc;
+
+    // Virtual root items have no bounding rectangle
+    if ( IS_VIRTUAL_ROOT(item) )
+    {
+        return false;
+    }
+
     if ( TreeView_GetItemRect(GetHwnd(), HITEM(item),
                               &rc, textOnly) )
     {