X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dcd307ee1f13834bdfe43a0964db657bcd860142..50494a55ae4f0ec07a15b811dbcce5a8ae9fc7bc:/src/os2/choice.cpp diff --git a/src/os2/choice.cpp b/src/os2/choice.cpp index 7448ef7e50..f834ab1fbc 100644 --- a/src/os2/choice.cpp +++ b/src/os2/choice.cpp @@ -20,9 +20,7 @@ #include "wx/os2/private.h" -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) -#endif bool wxChoice::Create(wxWindow *parent, wxWindowID id, @@ -30,7 +28,9 @@ bool wxChoice::Create(wxWindow *parent, const wxSize& size, int n, const wxString choices[], long style, +#if wxUSE_VALIDATORS const wxValidator& validator, +#endif const wxString& name) { if ( !CreateControl(parent, id, pos, size, style, validator, name) ) @@ -190,13 +190,12 @@ void* wxChoice::DoGetItemClientData( int n ) const void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData ) { - DoSetClientData(n, clientData); + DoSetItemClientData(n, clientData); } wxClientData* wxChoice::DoGetItemClientObject( int n ) const { - // TODO: return (wxClientData *)DoGetClientData(n); - return NULL; + return (wxClientData *)DoGetItemClientData(n); } // ---------------------------------------------------------------------------- @@ -215,7 +214,7 @@ void wxChoice::DoSetSize(int x, int y, wxControl::DoSetSize(x, y, width, -1, sizeFlags); } -wxSize wxChoice::DoGetBestSize() +wxSize wxChoice::DoGetBestSize() const { // find the widest string int wLine; @@ -236,7 +235,7 @@ wxSize wxChoice::DoGetBestSize() // the combobox should be larger than the widest string int cx, cy; - wxGetCharSize(GetHWND(), &cx, &cy, &GetFont()); + wxGetCharSize(GetHWND(), &cx, &cy, (wxFont*)&GetFont()); wChoice += 5*cx;