Author Topic: Displaying Unicode chars in a Dialog box  (Read 11313 times)

mcamember

  • Guest
Displaying Unicode chars in a Dialog box
« on: December 11, 2007, 08:06:09 PM »
Using NASM 0.98.39 (01/16/2005) in Windows 2000 Pro I've coded
a main window with a dialog box and the dialog box has an edit
box within it.

The dialog box uses templates created in the data area of the program, NOT a separate resource file.

The main window is created using CreateWindowW and the Dialog
box is  created with CreateDialogIndirectParamW using the pre-
defined Dialog Box class (The class array is left at 0x0 )

ASCII chars display o.k.in the edit box but nothing I've done will allow it to display Unicode chars. A memory dump shows all question marks.

For starters, does anyone know if there's an inherent problem with  CreateDialogIndirectParamW that prevents Unicode from displaying in
the edit box? All other Unicode strings (titlebar, control text etc.)display o.k. and the main window displays Unicode o.k.

Thanks in advance,
afk

mcamember

  • Guest
Re: Displaying Unicode chars in a Dialog box
« Reply #1 on: December 13, 2007, 06:55:18 PM »
Problem solved.
I needed to add DS_SETFONT to the DLGTEMPLATE.style and
add a fourth array declaring font point size and face.
Even though I post-pended all APIs with  'W' it seems the default font in Win2k doesn't support Unicode. I find this surprising since the
entire system seems to be grounded in NT.

Sorry for any time you guys might have wasted on this.
afk

nobody

  • Guest
Re: Displaying Unicode chars in a Dialog box
« Reply #2 on: December 13, 2007, 07:20:06 PM »
Not something I was wasting time on (Sorry), but thanks for posting the info!

Best,
Frank