X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..c6e62f74fcac5b62889b59e7ce7a41d0ce884d7b:/src/msw/checkbox.cpp diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index fec4da27fc..3e8f804185 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -39,8 +39,8 @@ // macros // ---------------------------------------------------------------------------- - IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) - IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) +IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxBitmapCheckBox, wxCheckBox) // ============================================================================ // implementation @@ -60,14 +60,18 @@ bool wxCheckBox::MSWCommand(WXUINT WXUNUSED(param), WXWORD WXUNUSED(id)) } // Single check box item -bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, - const wxPoint& pos, - const wxSize& size, long style, - const wxValidator& validator, - const wxString& name) +bool wxCheckBox::Create(wxWindow *parent, + wxWindowID id, + const wxString& label, + const wxPoint& pos, + const wxSize& size, long style, + const wxValidator& validator, + const wxString& name) { SetName(name); +#if wxUSE_VALIDATORS SetValidator(validator); +#endif // wxUSE_VALIDATORS if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetBackgroundColour()) ; @@ -194,7 +198,9 @@ bool wxBitmapCheckBox::Create(wxWindow *parent, wxWindowID id, const wxBitmap *l const wxString& name) { SetName(name); +#if wxUSE_VALIDATORS SetValidator(validator); +#endif // wxUSE_VALIDATORS if (parent) parent->AddChild(this); SetBackgroundColour(parent->GetBackgroundColour()) ;