X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8c10795d589c024dc7fc3640087a48a1ec612ce..032bc940fcde34cc649eaa111cd6aff1cda66104:/src/msw/checkbox.cpp diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index b58d672d58..4a11fa5c46 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/checkbox.cpp +// Name: src/msw/checkbox.cpp // Purpose: wxCheckBox // Author: Julian Smart // Modified by: @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "checkbox.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -30,8 +26,9 @@ #if wxUSE_CHECKBOX +#include "wx/checkbox.h" + #ifndef WX_PRECOMP - #include "wx/checkbox.h" #include "wx/brush.h" #include "wx/dcscreen.h" #include "wx/settings.h" @@ -216,9 +213,9 @@ wxSize wxCheckBox::DoGetBestSize() const wxString str = wxGetWindowText(GetHWND()); int wCheckbox, hCheckbox; - if ( !str.IsEmpty() ) + if ( !str.empty() ) { - GetTextExtent(str, &wCheckbox, &hCheckbox); + GetTextExtent(GetLabelText(str), &wCheckbox, &hCheckbox); wCheckbox += s_checkSize + GetCharWidth(); if ( hCheckbox < s_checkSize ) @@ -457,7 +454,8 @@ bool wxCheckBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) // to it without breaking backwards compatibility // classic Win32 version -- this can be useful when we move this into -#ifdef __WXWINCE__ + // wxRendererNative +#if defined(__WXWINCE__) || !wxUSE_UXTHEME UINT state = DFCS_BUTTONCHECK; if ( !IsEnabled() ) state |= DFCS_INACTIVE;