]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
fixed somebody's poorly done StreamSize-->GetSize transition
[wxWidgets.git] / src / msw / treectrl.cpp
index cd689184370e40fc31fe50f1b4af1470f041c572..8363d6ca9f58e033820252684541e2cb2f9396e3 100644 (file)
 #include "wx/treectrl.h"
 
 #ifdef __GNUWIN32__
+#ifndef wxUSE_NORLANDER_HEADERS
 #include "wx/msw/gnuwin32/extra.h"
 #endif
+#endif
 
-#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__)
+#if (defined(__WIN95__) && !defined(__GNUWIN32__)) || defined(__TWIN32__) || defined(wxUSE_NORLANDER_HEADERS)
     #include <commctrl.h>
 #endif
 
@@ -195,17 +197,21 @@ bool wxTreeCtrl::Create(wxWindow *parent,
     if ( m_windowStyle & wxTR_LINES_AT_ROOT )
         wstyle |= TVS_LINESATROOT;
 
-#ifndef __GNUWIN32__
+#if !defined( __GNUWIN32__ ) && !defined(wxUSE_NORLANDER_HEADERS)
     // we emulate the multiple selection tree controls by using checkboxes: set
     // up the image list we need for this if we do have multiple selections
     if ( m_windowStyle & wxTR_MULTIPLE )
-       wstyle |= TVS_CHECKBOXES;
+        wstyle |= TVS_CHECKBOXES;
 #endif
 
     // Create the tree control.
     if ( !MSWCreateControl(WC_TREEVIEW, wstyle) )
         return FALSE;
 
+    // the treectrl with any other background looks ugly because the items
+    // background is white anyhow
+    SetBackgroundColour(*wxWHITE);
+
     // VZ: this is some experimental code which may be used to get the
     //     TVS_CHECKBOXES style functionality for comctl32.dll < 4.71.
     //     AFAIK, the standard DLL does about the same thing anyhow.