With Glen Perkin's help, I've corrected my previous version of the sample so
that it builds and runs with VC 6.0, and correctly displays the Unicode
text. I still haven't managed to run it on Win9x myself, but Glen told me it
To summarize the key points to get this to work:
- To add Unicode text to a richedit 2 control, you can use the EM_STREAMIN
- You must make sure to create the font with a charset code that the font
supports and covers the codepoints that you wish to display. Thanks to Glen
for this point.
I've attached an updated version of the sample.
As before, you may need to adjust the sample to use a font/charset installed
on your system. This sample is a minimal program to meet Glen's challenge of
using richedit 2 on English Win9x to display the Chinese characters for
A more sophisticated sample would enumerate available fonts to find a
suitable one. This sample sets the font for the entire control. Fancier uses
of the richedit control use EM_SETCHARFORMAT. Take care to set the bCharset
member of the CHARFORMAT structure to a charset that the font supports and
covers the codepoints you wish to display.
This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:56 EDT