From: Václav Slavík Date: Sat, 15 Dec 2001 16:45:34 +0000 (+0000) Subject: blind fix for Unicode compilation of wxTextCtrl/msw X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b0c42805875e71afdbf5e1ac013945da9c1fea20?ds=sidebyside blind fix for Unicode compilation of wxTextCtrl/msw git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index c4803778fe..c64bfb06e8 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -468,6 +468,7 @@ extern long wxEncodingToCodepage(wxFontEncoding encoding); // from strconv.cpp bool wxTextCtrl::StreamIn(const wxString& value, wxFontEncoding encoding) { +#if !wxUSE_UNICODE // we have to use EM_STREAMIN to force richedit control 2.0+ to show any // text in the non default charset - otherwise it thinks it knows better // than we do and always shows it in the default one @@ -491,6 +492,9 @@ bool wxTextCtrl::StreamIn(const wxString& value, wxFontEncoding encoding) // finally, stream it in the control const wchar_t *wpc = wchBuf; +#else + const wchar_t *wpc = value.c_str(); +#endif EDITSTREAM eds; wxZeroMemory(eds);