From: Vadim Zeitlin Date: Sun, 9 Dec 2001 12:56:03 +0000 (+0000) Subject: fix for my old and broken mingw32 headers X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7a25a27c354d8dc6a1ac18a56cc7083c5bb93242?ds=sidebyside fix for my old and broken mingw32 headers git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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,