X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..f415cab9ef1433413a1a68a982ee9b17c5a8deda:/src/msw/checkbox.cpp diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index cd9dd38df8..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: @@ -26,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" @@ -212,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 )