m_backgroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_BTNFACE);
m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT);
- // GRG, changed Mar/2000
+ // don't set the font here for wxMSW as we don't call WM_SETFONT here and
+ // so the font is *not* really set - but calls to SetFont() later won't do
+ // anything because m_font appears to be already set!
+#ifndef __WXMSW__
m_font = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT);
+#endif // __WXMSW__
// no style bits
m_exStyle =
// don't try to set invalid font, always fall back to the default
const wxFont& fontOk = font.Ok() ? font : *wxSWISS_FONT;
- if ( (wxFont&)fontOk == m_font )
+ if ( fontOk == m_font )
{
// no change
return FALSE;
if ( event.GetSetText() )
{
- wxControl *control = wxDynamicCast(this, wxControl);
+ wxControl *control = wxDynamicThisCast(this, wxControl);
if ( control )
{
wxTextCtrl *text = wxDynamicCast(control, wxTextCtrl);
}
#if wxUSE_CHECKBOX
- wxCheckBox *checkbox = wxDynamicCast(this, wxCheckBox);
+ wxCheckBox *checkbox = wxDynamicThisCast(this, wxCheckBox);
if ( checkbox )
{
if ( event.GetSetChecked() )
#endif // wxUSE_CHECKBOX
#if wxUSE_RADIOBTN
- wxRadioButton *radiobtn = wxDynamicCast(this, wxRadioButton);
+ wxRadioButton *radiobtn = wxDynamicThisCast(this, wxRadioButton);
if ( radiobtn )
{
if ( event.GetSetChecked() )