X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27fda0b6a1e652dbe8a131796bbc8ca56d95eda0..520e470fdd0daef09c77938db642e4583933c90d:/src/msw/checkbox.cpp?ds=sidebyside diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 1beb5c6d35..fb0b511b6d 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -51,8 +51,8 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, SetValidator(validator); if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; + SetBackgroundColour(parent->GetBackgroundColour()) ; + SetForegroundColour(parent->GetForegroundColour()) ; m_windowStyle = style; @@ -83,8 +83,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, // Even with extended styles, need to combine with WS_BORDER // for them to look right. - if (want3D && ((m_windowStyle & wxSIMPLE_BORDER) || (m_windowStyle & wxRAISED_BORDER) || - (m_windowStyle & wxSUNKEN_BORDER) || (m_windowStyle & wxDOUBLE_BORDER))) + if ( want3D || wxStyleHasBorder(m_windowStyle) ) msStyle |= WS_BORDER; m_hWnd = (WXHWND)CreateWindowEx(exStyle, "BUTTON", Label, @@ -221,8 +220,8 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l SetValidator(validator); if (parent) parent->AddChild(this); - SetBackgroundColour(parent->GetDefaultBackgroundColour()) ; - SetForegroundColour(parent->GetDefaultForegroundColour()) ; + SetBackgroundColour(parent->GetBackgroundColour()) ; + SetForegroundColour(parent->GetForegroundColour()) ; m_windowStyle = style; if ( id == -1 )