X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b9a7c3331eda5d674e3f67eb0add00df1bcf907..3eabbbcc5d6a3dc2395a48eeed3da4bc894f644b:/src/msw/checkbox.cpp diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 85a52a49cc..4912796413 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -104,7 +104,18 @@ bool wxCheckBox::Create(wxWindow *parent, if ( !CreateControl(parent, id, pos, size, style, validator, name) ) return false; - long msStyle = WS_TABSTOP; + WXDWORD exstyle; + WXDWORD msStyle = MSWGetStyle(style, &exstyle); + + msStyle |= wxMSWButton::GetMultilineStyle(label); + + return MSWCreateControl(wxT("BUTTON"), msStyle, pos, size, label, exstyle); +} + +WXDWORD wxCheckBox::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + // buttons never have an external border, they draw their own one + WXDWORD msStyle = wxControl::MSWGetStyle(style, exstyle); if ( style & wxCHK_3STATE ) msStyle |= BS_3STATE; @@ -116,16 +127,14 @@ bool wxCheckBox::Create(wxWindow *parent, msStyle |= BS_LEFTTEXT | BS_RIGHT; } - msStyle |= wxMSWButton::GetMultilineStyle(label); - - return MSWCreateControl(wxT("BUTTON"), msStyle, pos, size, label, 0); + return msStyle; } // ---------------------------------------------------------------------------- // wxCheckBox geometry // ---------------------------------------------------------------------------- -wxSize wxCheckBox::DoGetBestSize() const +wxSize wxCheckBox::DoGetBestClientSize() const { static int s_checkSize = 0;