• Welcome to Valhalla Legends Archive.
 

"Low-level" Win32 Unicode text output - DrawTextW?

Started by Skywing, October 08, 2003, 08:20 PM

Previous topic - Next topic

Skywing

I've tracked down a problem in displaying some Unicode characters in my MSN messenger program to DrawTextW.

Specifically, if I pass, say, an Arabic or a Japanese character to DrawTextW, it outputs a box.

A Rich Edit control has no trouble correctly displaying these.  What am I supposed to be using if DrawTextW isn't working right, or is there some special thing I need to do to make it work properly?  In both cases, I used the "MS Shell Dlg" font.

If necessary, I can post portions of the code.

TheMinistered


Skywing

Quote from: TheMinistered on October 08, 2003, 09:56 PM
Did you try using DrawTextEx?
No.  Unless I'm mistaken, the extra formatting options (tab length, margins) that DrawTextEx provides should not matter here.

drivehappy

#3
"Windows 2000/XP: There is a new interface font called MS Shell Dlg 2. This maps to Tahoma, which is the default font used throughout the system. For an application that runs only on these systems, you can specify DS_SHELLFONT with MS Shell Dlg 2 to map to Tahoma. "
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_4qcn.asp

Maybe try the font-face "MS Shell Dlg 2"?

Skywing

Quote from: drivehappy on October 08, 2003, 11:41 PM
"Windows 2000/XP: There is a new interface font called MS Shell Dlg 2. This maps to Tahoma, which is the default font used throughout the system. For an application that runs only on these systems, you can specify DS_SHELLFONT with MS Shell Dlg 2 to map to Tahoma. "
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_4qcn.asp

Maybe try the font-face "MS Shell Dlg 2"?
I'll give it a try, but a) the program should run on Windows NT4 (and Windows 98), and b) "MS Shell Dlg" works with RichEdit.