]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Build and distrib tweaks
[wxWidgets.git] / src / msw / textctrl.cpp
index 4282e711fe633b58402e843df7e34f125633bfdb..c4803778fedc7295da921f8afb22ea05d18c4efa 100644 (file)
     } ENLINK;
 #endif // ENLINK
 
+#ifndef SF_UNICODE
+    #define SF_UNICODE 0x0010
+#endif
+
 // ----------------------------------------------------------------------------
 // private functions
 // ----------------------------------------------------------------------------
@@ -491,7 +495,8 @@ bool wxTextCtrl::StreamIn(const wxString& value, wxFontEncoding encoding)
     EDITSTREAM eds;
     wxZeroMemory(eds);
     eds.dwCookie = (DWORD)&wpc;
-    eds.pfnCallback = wxRichEditStreamIn;
+    // 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,