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;
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;