-
August 27th, 2003, 05:24 AM
#1
Using Unicode Characters in a DC ?
Hi
What character set should i use to display Unicode characters in a DC ?
ie - Arial or courier ?
thanks
P
-
August 27th, 2003, 05:36 AM
#2
Deppends on the type of Unicode characters.
You should select an appropiate font which supports those characters.
Also if you application is not UNICODE you should call the Unicode versions of the DC text functions.
-
August 27th, 2003, 05:47 AM
#3
Hi
how can i find out what the font is for the appropriate Unicode characters ?
also is there a Unicode version of dc->TextOut() ???
thanks
-
August 27th, 2003, 05:55 AM
#4
Deppends on the unicode characters you want to write.
What kind of characters are?
And yes, TextOut has both Ansi (TextOutA) and Unicode (TextOutW) implementations.
If your program is not UNICODE you might need to call TextOutW with wchat_t[] strings as parameter.
-
August 27th, 2003, 06:06 AM
#5
This is the literal value of one of them L'\x2500' basicaly it is a corner of a box !
thanks
-
August 27th, 2003, 06:13 AM
#6
Use Arial for example.
It should not be any problem because that symbols is shown correctly in the character map at that location.
-
August 27th, 2003, 08:49 AM
#7
Search this forum for "DrawTextW" and "TextOutW" (but not both at the same time). It will probably work better if you combine those with "Japanese" and "Chinese". There have been previous questions with many useful answers. I am not sure what would be the best combination of keywords to use to search so it is worthwhile to try a few different combinations.
There is a KB article about Chinese that has a small peice of sample code that would help for other languages and you could find the KB article by searching the MS KB for it but there are previous answers in this forum that link to it and such.
Last edited by Sam Hobbs; August 27th, 2003 at 08:53 AM.
-
August 27th, 2003, 09:19 AM
#8
I think that on Windows 95,98,Me systems DrawTextW will require the aid of the Microsoft Layer for Unicode to work. However TextOutW will work "always".
Maybe is also a good idea to search MSDN for a detailed information about these topics.
-
August 27th, 2003, 09:25 AM
#9
Will do
thanks one and all
-
August 27th, 2003, 10:01 AM
#10
Originally posted by Doctor Luz
I think that on Windows 95,98,Me systems DrawTextW will require the aid of the Microsoft Layer for Unicode to work. However TextOutW will work "always".
Maybe is also a good idea to search MSDN for a detailed information about these topics.
There is a KB article explaining that some Unicode support is installed by Internet Explorer.
-
August 27th, 2003, 01:21 PM
#11
If you are going to use Far East character, then
Well, what I am saying here will at least cope with Far-East language:
If you have installed that kinds of language in your Win2k, you will have a font called "SimSun" in yr font folder. Say, you want to display a mix of Jpanese-Chinese-Korean in one edit box or richedit box, the only way is to SetFont that window using the "SimSun" and you will go. Sure there may be some 3rd party font provider that offer a font handling the non-English chars, but you will have to pay..
You can find an example of my article in codeguru here:
http://www.codeguru.com/system/KeyLoggerMore2.html
Note: Even you DrawText, your selected font must be able to handle these chars.
Help this help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|