X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d4b632ba3c0e5e5c43412d2d7a2b485b8fcebf2..38755449339718307f594d0c92f7d37ce56c908c:/src/os2/button.cpp?ds=inline diff --git a/src/os2/button.cpp b/src/os2/button.cpp index dc33b17225..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 @@ -33,11 +31,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos, const wxSize& size, long style, #if wxUSE_VALIDATORS -# if defined(__VISAGECPP__) - const wxValidator* validator, -# else const wxValidator& validator, -# endif #endif const wxString& name) { @@ -76,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;