]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/treectrl.cpp
header inclusion fix
[wxWidgets.git] / src / msw / treectrl.cpp
index d9affa465f8abe62add4e730d9f73ead0609a336..8171cae0a3ce9ebe4e3845b0aca6b22a921396f0 100644 (file)
@@ -45,6 +45,7 @@
 #include "wx/dynarray.h"
 #include "wx/imaglist.h"
 #include "wx/treectrl.h"
+#include "wx/settings.h"
 
 #ifdef __GNUWIN32__
 #ifndef wxUSE_NORLANDER_HEADERS
@@ -212,9 +213,9 @@ bool wxTreeCtrl::Create(wxWindow *parent,
     if ( !MSWCreateControl(WC_TREEVIEW, wstyle) )
         return FALSE;
 
-    // the treectrl with any other background looks ugly because the items
-    // background is white anyhow
-    SetBackgroundColour(*wxWHITE);
+    SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW));
+    SetForegroundColour(wxWindow::GetParent()->GetForegroundColour());
+
 
     // VZ: this is some experimental code which may be used to get the
     //     TVS_CHECKBOXES style functionality for comctl32.dll < 4.71.