// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "listbox.h"
#endif
#include "wx/msw/gnuwin32/extra.h"
#endif
+#if wxUSE_EXTENDED_RTTI
+IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl,"wx/listbox.h")
+
+WX_BEGIN_PROPERTIES_TABLE(wxListBox)
+ // TODO DELEGATES
+ WX_PROPERTY( Font , wxFont , SetFont , GetFont , )
+ WX_PROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings )
+ WX_PROPERTY( Selection ,int, SetSelection, GetSelection, )
+WX_END_PROPERTIES_TABLE()
+
+WX_BEGIN_HANDLERS_TABLE(wxListBox)
+WX_END_HANDLERS_TABLE()
+
+WX_CONSTRUCTOR_4( wxListBox , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size )
+#else
IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl)
+#endif
+
+/*
+TODO PROPERTIES
+ selection
+ content
+ item
+*/
// ============================================================================
// list box item declaration and implementation
if (m_windowStyle & wxLB_SORT)
wstyle |= LBS_SORT;
-#if wxUSE_OWNER_DRAWN
+#if wxUSE_OWNER_DRAWN && !defined(__WXWINCE__)
if ( m_windowStyle & wxLB_OWNERDRAW ) {
// we don't support LBS_OWNERDRAWVARIABLE yet
wstyle |= LBS_OWNERDRAWFIXED;
// +1 for terminating NUL
wxString result;
- ListBox_GetText(GetHwnd(), N, result.GetWriteBuf(len + 1));
- result.UngetWriteBuf();
+ ListBox_GetText(GetHwnd(), N, wxStringBuffer(result, len + 1));
return result;
}
MEASUREITEMSTRUCT *pStruct = (MEASUREITEMSTRUCT *)item;
+#ifdef __WXWINCE__
+ HDC hdc = GetDC(NULL);
+#else
HDC hdc = CreateIC(wxT("DISPLAY"), NULL, NULL, 0);
+#endif
wxDC dc;
dc.SetHDC((WXHDC)hdc);