X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33ac7e6f01acbac1cff0ad400d8ea7f0bfd0a62f..70b8ab778fc3f9f89874a242bfa014f2b313c59b:/src/msw/checkbox.cpp?ds=sidebyside diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 1a19d1383a..8a5c375e22 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -28,6 +28,8 @@ #pragma hdrstop #endif +#if wxUSE_CHECKBOX + #ifndef WX_PRECOMP #include "wx/checkbox.h" #include "wx/brush.h" @@ -104,6 +106,9 @@ bool wxCheckBox::Create(wxWindow *parent, if ( style & wxALIGN_RIGHT ) msStyle |= BS_LEFTTEXT; + if ( style & wxCLIP_SIBLINGS ) + msStyle |= WS_CLIPSIBLINGS; + // We perhaps have different concepts of 3D here - a 3D border, // versus a 3D button. // So we only wish to give a border if this is specified @@ -154,9 +159,9 @@ wxSize wxCheckBox::DoGetBestSize() const if ( !s_checkSize ) { wxScreenDC dc; - dc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + dc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); - s_checkSize = (3*dc.GetCharHeight())/2; + s_checkSize = dc.GetCharHeight(); } wxString str = wxGetWindowText(GetHWND()); @@ -266,3 +271,5 @@ void wxBitmapCheckBox::SetLabel(const wxBitmap& WXUNUSED(bitmap)) { wxFAIL_MSG(wxT("not implemented")); } + +#endif // wxUSE_CHECKBOX