- if ( !MSWCreateControl(wxT("BUTTON"), label, pos, size) )
- return false;
-
- return true;
-}
-
-wxBorder wxToggleButton::GetDefaultBorder() const
-{
- return wxBORDER_NONE;
+ // if the label contains several lines we must explicitly tell the button
+ // about it or it wouldn't draw it correctly ("\n"s would just appear as
+ // black boxes)
+ //
+ // NB: we do it here and not in MSWGetStyle() because we need the label
+ // value and the label is not set yet when MSWGetStyle() is called
+ WXDWORD exstyle;
+ WXDWORD msStyle = MSWGetStyle(style, &exstyle);
+ msStyle |= wxMSWButton::GetMultilineStyle(label);
+
+ return MSWCreateControl(_T("BUTTON"), msStyle, pos, size, label, exstyle);