diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 66b7a509b1..afc8bb65ed 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -174,8 +174,7 @@ bool wxListCtrl::DoCreateControl(int x, int y, int w, int h) } #endif // ListView_SetExtendedListViewStyle - wxSystemSettings settings; - SetBackgroundColour(settings.GetSystemColour(wxSYS_COLOUR_WINDOW)); + SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOW)); SetForegroundColour(GetParent()->GetForegroundColour()); SubclassWin(m_hWnd); diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index d9affa465f..ff98a5db03 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -212,9 +212,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.