X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae090fdb7f4be47466b5728ad37065923b48c8c3..55d607461b4ccb18a45f9c116e2134096ee70c3b:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 10826ae39f..3bd2d2cfa8 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -29,6 +29,8 @@ #pragma hdrstop #endif +#if wxUSE_LISTCTRL + #ifdef __WIN95__ #ifndef WX_PRECOMP @@ -1990,7 +1992,8 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl, wxListItem& info, LV_ } else { - lvItem.pszText = WXSTRINGCAST info.m_text; + // pszText is not const, hence the cast + lvItem.pszText = (wxChar *)info.m_text.c_str(); if ( lvItem.pszText ) lvItem.cchTextMax = info.m_text.Length(); else @@ -2021,3 +2024,4 @@ wxListEvent::wxListEvent(wxEventType commandType, int id) #endif // __WIN95__ +#endif // wxUSE_LISTCTRL