X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e3be693d0e18531299c8f45d27d79f23f948eba..669b65b94575865adc226d35a0de0dd81dde1e5f:/src/msw/listbox.cpp?ds=inline diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 8a3588b32c..b587d32dba 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "listbox.h" #endif @@ -49,6 +49,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox, wxControl) +/* +TODO PROPERTIES + selection + content + item +*/ + // ============================================================================ // list box item declaration and implementation // ============================================================================ @@ -145,7 +152,7 @@ bool wxListBox::Create(wxWindow *parent, 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; @@ -454,8 +461,7 @@ wxString wxListBox::GetString(int N) const // +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; } @@ -703,7 +709,11 @@ bool wxListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item) 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);