X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f38374d0d7aa865e9bbe8ee61b75b94ffcdfb220..8f974c520a8733158591891458fda10fae4c3950:/src/os2/button.cpp diff --git a/src/os2/button.cpp b/src/os2/button.cpp index c4f5ac0f10..cecadf63ee 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -23,9 +23,7 @@ #include "wx/os2/private.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) -#endif // Button @@ -72,14 +70,14 @@ wxButton::~wxButton() // size management including autosizing // ---------------------------------------------------------------------------- -wxSize wxButton::DoGetBestSize() +wxSize wxButton::DoGetBestSize() const { wxString label = wxGetWindowText(GetHWND()); int wBtn; GetTextExtent(label, &wBtn, NULL); int wChar, hChar; - wxGetCharSize(GetHWND(), &wChar, &hChar, &GetFont()); + wxGetCharSize(GetHWND(), &wChar, &hChar, (wxFont*)&GetFont()); // add a margin - the button is wider than just its label wBtn += 3*wChar;