Discussion:
Problems with Richedit and Vista
(too old to reply)
Peter Flindt
2007-07-03 15:47:06 UTC
Permalink
Hello,
I have a C++ application which use a RICHEDIT_CLASS and works well on
Windows XP SP2 but on Vista I get sometimes unexpected Chinese Text
output.
Could a change in the RichEdit Control the reason? I found nothing
about it in the MSDN only something about Windows XP and Richedit.
If somebody say nothing have changed, it's ok, but my first idea was a
change in the richedit control, therefore I ask here.

Peter
BJ
2007-08-23 14:46:08 UTC
Permalink
I spent three weeks banging my head against the wall for the same reason. I
believe you are correct -- they did change the rich edit class in Vista. My
problem was that I was mixing english with a foreign language and the control
was dropping the foreign language text.

Unless you explictly use UNICODE in your project as a compiler option (which
opens up a whole 'nother set of issues), you will have to code around getting
your output out of the control.

Unless you use UNICODE, the framework assumes that your control is using
ASCII and pretranslates the text before it reaches the control. The only way
for you to get around this is to use the StreamIn/StreamOut functions to get
the text and you have to use RTF.

The other option is to manually set the code page to whatever language
you're using. If you set the code page in Control Panel, the rich edit
control seems to behave as expected and you can use TEXT in the Stream
functions. Of course, that may screw up your other applications but hey, WOW
Vista!

BTW, I was using Richedit 2, you may want to try one of the newer versions
and see if that works better.

Good Luck!
Post by Peter Flindt
Hello,
I have a C++ application which use a RICHEDIT_CLASS and works well on
Windows XP SP2 but on Vista I get sometimes unexpected Chinese Text
output.
Could a change in the RichEdit Control the reason? I found nothing
about it in the MSDN only something about Windows XP and Richedit.
If somebody say nothing have changed, it's ok, but my first idea was a
change in the richedit control, therefore I ask here.
Peter
Peter Flindt
2007-08-23 15:51:24 UTC
Permalink
Thanks for you response.
I will take a look on it, but i guess you talk about another problem
with RichEdit. When I understand you correct, this is a general problem
with all text. But I get the it here only rarely not always.

Peter
Post by BJ
I spent three weeks banging my head against the wall for the same reason. I
believe you are correct -- they did change the rich edit class in Vista. My
problem was that I was mixing english with a foreign language and the control
was dropping the foreign language text.
Unless you explictly use UNICODE in your project as a compiler option (which
opens up a whole 'nother set of issues), you will have to code around getting
your output out of the control.
Unless you use UNICODE, the framework assumes that your control is using
ASCII and pretranslates the text before it reaches the control. The only way
for you to get around this is to use the StreamIn/StreamOut functions to get
the text and you have to use RTF.
The other option is to manually set the code page to whatever language
you're using. If you set the code page in Control Panel, the rich edit
control seems to behave as expected and you can use TEXT in the Stream
functions. Of course, that may screw up your other applications but hey, WOW
Vista!
BTW, I was using Richedit 2, you may want to try one of the newer versions
and see if that works better.
Good Luck!
Post by Peter Flindt
Hello,
I have a C++ application which use a RICHEDIT_CLASS and works well on
Windows XP SP2 but on Vista I get sometimes unexpected Chinese Text
output.
Could a change in the RichEdit Control the reason? I found nothing
about it in the MSDN only something about Windows XP and Richedit.
If somebody say nothing have changed, it's ok, but my first idea was a
change in the richedit control, therefore I ask here.
Peter
Loading...