X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b6ca231f85a50ea7dc5af6d0f3c98854970dffdc..cbf656555e872684a74eb0badffe1aa33bedf95d:/src/msw/listctrl.cpp?ds=sidebyside diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 4f21955870..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 = 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