X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32cd189dfcfe96c41e32c3b9827bf67484c60b13..2bfca191bf2261e385594a369da9aa4e4441aa43:/src/msw/radiobut.cpp?ds=inline diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 61ab90ded2..134a81dfe2 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -290,6 +290,13 @@ wxSize wxRadioButton::DoGetBestSize() const dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); s_radioSize = dc.GetCharHeight(); + + // radio button bitmap size under CE is bigger than the font height, + // adding just one pixel seems to work fine for the default font but it + // would be nice to find some better way to find the correct height +#ifdef __WXWINCE__ + s_radioSize++; +#endif // __WXWINCE__ } wxString str = GetLabel(); @@ -314,4 +321,14 @@ wxSize wxRadioButton::DoGetBestSize() const return best; } +WXDWORD wxRadioButton::MSWGetStyle(long style, WXDWORD *exstyle) const +{ + WXDWORD styleMSW = wxControl::MSWGetStyle(style, exstyle); + + if ( style & wxRB_GROUP ) + styleMSW |= WS_GROUP; + + return styleMSW; +} + #endif // wxUSE_RADIOBTN