diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 7c928d371b..f9790875b9 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -322,8 +322,14 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id, long style, const wxValidator& validator, const wxString& name) { - return wxListBox::Create(parent, id, pos, size, n, choices, - style | wxLB_OWNERDRAW, validator, name); + if (wxListBox::Create(parent, id, pos, size, n, choices, + style | wxLB_OWNERDRAW, validator, name)) + { + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + return true; + } + else + return false; } bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id, @@ -332,8 +338,14 @@ bool wxCheckListBox::Create(wxWindow *parent, wxWindowID id, long style, const wxValidator& validator, const wxString& name) { - return wxListBox::Create(parent, id, pos, size, choices, - style | wxLB_OWNERDRAW, validator, name); + if (wxListBox::Create(parent, id, pos, size, choices, + style | wxLB_OWNERDRAW, validator, name)) + { + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); + return true; + } + else + return false; } // misc overloaded methods