Hi all
How do I set the charset in a RichEdit control?
This does not work. :confused:
KetilO
How do I set the charset in a RichEdit control?
This does not work. :confused:
;Set font charset
mov cf.cbSize,sizeof cf
mov cf.dwMask,CFM_CHARSET
mov al,lfnt.lfCharSet
mov cf.bCharSet,al
invoke SendMessage,hWin,EM_SETCHARFORMAT,SCF_ALL,addr cf
KetilO
i thought maybe this might be it. or maybe you already have filled the structure info somewhere in your code already..
mov cf.cbSize,sizeof cf
mov cf.dwMask,CFM_CHARSET
mov lfnt.lfCharSet,RUSSIAN_CHARSET ;<-- maybe you forgot this line?
mov al,lfnt.lfCharSet
mov cf.bCharSet,al
invoke SendMessage,hWin,EM_SETCHARFORMAT,SCF_ALL,addr cf
Hi smurf
Yes, lfnt.lfCharSet is set by ChooseFont.
KetilO
Yes, lfnt.lfCharSet is set by ChooseFont.
KetilO
ok have you checked out ewayne's richedit demo? he demonstrates the use in it. here is a direct link:
http://www20.brinkster.com/ewayne/files/RichEdit.zip
doh!! i just noticed your not sending your message to the richedit control.
change the hWin to the handle of your Richedit
http://www20.brinkster.com/ewayne/files/RichEdit.zip
doh!! i just noticed your not sending your message to the richedit control.
change the hWin to the handle of your Richedit
Hi smurf
The sniplet shown is a small part of a richedit formatting proc.
hWin is the handle to the richedit control. I even tried to send a EM_GETCHARFORMAT and the cf.bCharSet is set. :confused:
I will check out Ewains demo.
KetilO
The sniplet shown is a small part of a richedit formatting proc.
hWin is the handle to the richedit control. I even tried to send a EM_GETCHARFORMAT and the cf.bCharSet is set. :confused:
I will check out Ewains demo.
KetilO
Hi all
Well, Ewaynes demo did not work either. Makes me wonder if there is something wrong with my richedit. Here is my test project. Maybe someone can test it.
KetilO
Well, Ewaynes demo did not work either. Makes me wonder if there is something wrong with my richedit. Here is my test project. Maybe someone can test it.
KetilO
what exactly do you want tested. i was able to change my font just fine.
Hi smurf
When selecting font, specify Russian or any other CharSet.
Russian characters should be in the range Alt+128 an up.
I can only get the standard ansi to show in the richedit.
KetilO
When selecting font, specify Russian or any other CharSet.
Russian characters should be in the range Alt+128 an up.
I can only get the standard ansi to show in the richedit.
KetilO
I checked it.
It works fine with Russian charset even when font is not changed
to Cyrrilic. :)
May be it's not right place to ask but here is one thing in RadAsm that always trapped me:
Here is option to change text and editor font.
Every time I load it (RadAsm) I see that Western charset is set.
Then I (every time) change it to Cyrrilic, but when I load it again it
is again Western charset.
It works fine with Russian charset even when font is not changed
to Cyrrilic. :)
May be it's not right place to ask but here is one thing in RadAsm that always trapped me:
Here is option to change text and editor font.
Every time I load it (RadAsm) I see that Western charset is set.
Then I (every time) change it to Cyrrilic, but when I load it again it
is again Western charset.
Seems I got it!
Those strange effects in your reachedit with national charsets
happen(at least in my machine) when using colors!
I recalled that I had once description text in experimental project and I don't remember that I had any problems with national characters there. Now I checked - That's it!
If no color highlighting - everything works.
I would start now some project in RadAsm if I could change main
text color (it's not white enough - hard to see) if I could change it
to white for text it would be nice, I don't really kin on highlighting
so it wouldn't be a great loss for me. But I prefer black background and thus text color for me need to be one of:
bright white
bright yellow
bright green
Those strange effects in your reachedit with national charsets
happen(at least in my machine) when using colors!
I recalled that I had once description text in experimental project and I don't remember that I had any problems with national characters there. Now I checked - That's it!
If no color highlighting - everything works.
I would start now some project in RadAsm if I could change main
text color (it's not white enough - hard to see) if I could change it
to white for text it would be nice, I don't really kin on highlighting
so it wouldn't be a great loss for me. But I prefer black background and thus text color for me need to be one of:
bright white
bright yellow
bright green
Hi The Svin
Good, it works.
In current version of RadASM charset is not saved. Now that I have the test working I will save and restore the selected charset.
KetilO
Good, it works.
In current version of RadASM charset is not saved. Now that I have the test working I will save and restore the selected charset.
KetilO
Hi The Svin
You can set text and back colors to any color you wish in RadASM.
KetilO
You can set text and back colors to any color you wish in RadASM.
KetilO
How?
Every time I choose color for backgroung (in not highligting mode)
it works, but when it the mode I choose text color it makes one
short flash and text color remains this blurred white.
Every time I choose color for backgroung (in not highligting mode)
it works, but when it the mode I choose text color it makes one
short flash and text color remains this blurred white.
Hi The Svin
1. Uncheck Use Hiliting
2. Select Back color
3. Select Fore color
4. Click Ok
I seem to remember a bug in eariler versions that would not set fore color properly.
KetilO
1. Uncheck Use Hiliting
2. Select Back color
3. Select Fore color
4. Click Ok
I seem to remember a bug in eariler versions that would not set fore color properly.
KetilO
Works!
I was wrong trying to set text color in the mode changing text color, should have use Fore Color instead.
Now I'll try something, be ready for feedback :)
Thank you.
I was wrong trying to set text color in the mode changing text color, should have use Fore Color instead.
Now I'll try something, be ready for feedback :)
Thank you.
Hi all
I still have problems with Russian charset in richedit (riched20.dll version 3).
When I select Russian keyboard and enter text it enters unicode.
Not at all what I wanted. Does anyone know the solution to this?
KetilO
I still have problems with Russian charset in richedit (riched20.dll version 3).
When I select Russian keyboard and enter text it enters unicode.
Not at all what I wanted. Does anyone know the solution to this?
KetilO