} ENLINK;
#endif // ENLINK
+#ifndef SF_UNICODE
+ #define SF_UNICODE 0x0010
+#endif
+
// ----------------------------------------------------------------------------
// private functions
// ----------------------------------------------------------------------------
}
}
-#if wxUSE_RICHEDIT
+#if wxUSE_RICHEDIT && !wxUSE_UNICODE
DWORD CALLBACK wxRichEditStreamIn(DWORD dwCookie, BYTE *buf, LONG cb, LONG *pcb)
{
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,
SetStyle(start, end, m_defaultStyle );
}
+#if !wxUSE_UNICODE
// next check if the text we're inserting must be shown in a non
// default charset -- this only works for RichEdit > 1.0
if ( GetRichVersion() > 1 )
}
}
}
+#endif // !wxUSE_UNICODE
}
if ( !done )