From b0c42805875e71afdbf5e1ac013945da9c1fea20 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 15 Dec 2001 16:45:34 +0000 Subject: [PATCH] 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 --- src/msw/textctrl.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.45.2