X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/92209a39661334baa1552f50cdbf9698053c34de..c16d276354b116475bf85a0388b4b0f545da0f82:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index c02095d762..c4803778fe 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -91,6 +91,10 @@ } ENLINK; #endif // ENLINK +#ifndef SF_UNICODE + #define SF_UNICODE 0x0010 +#endif + // ---------------------------------------------------------------------------- // private functions // ---------------------------------------------------------------------------- @@ -491,11 +495,8 @@ bool wxTextCtrl::StreamIn(const wxString& value, wxFontEncoding encoding) EDITSTREAM eds; wxZeroMemory(eds); eds.dwCookie = (DWORD)&wpc; - eds.pfnCallback = wxRichEditStreamIn; - -#ifndef SF_UNICODE -#define SF_UNICODE 0x0010 -#endif + // the cast below is needed for broken (very) old mingw32 headers + eds.pfnCallback = (EDITSTREAMCALLBACK)wxRichEditStreamIn; if ( !::SendMessage(GetHwnd(), EM_STREAMIN, SF_TEXT | SF_UNICODE | SFF_SELECTION,