#include "wx/os2/private.h"
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
-#endif
bool wxChoice::Create(wxWindow *parent,
wxWindowID id,
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) )
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);
}
// ----------------------------------------------------------------------------
wxControl::DoSetSize(x, y, width, -1, sizeFlags);
}
-wxSize wxChoice::DoGetBestSize()
+wxSize wxChoice::DoGetBestSize() const
{
// find the widest string
int wLine;
// 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;
return wxSize(wChoice, hChoice);
}
-MRESULT wxChoice::OS2WindowProc(HWND hwnd, WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
+MRESULT wxChoice::OS2WindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
{
// TODO:
/*
return 0;
}
*/
- return wxWindow::OS2WindowProc(hwnd, nMsg, wParam, lParam);
+ return wxWindow::OS2WindowProc(nMsg, wParam, lParam);
}
bool wxChoice::OS2Command(WXUINT param, WXWORD WXUNUSED(id))