Re: Unicode and windows menus

From: Michael \(michka\) Kaplan (michka@trigeminal.com)
Date: Wed Jul 18 2001 - 17:19:58 EDT


From: "Richard, Francois M" <Francois.M.Richard@usa.xerox.com>

> > Alternately, the program would have to use owner draw to
> > handle the menu
> > captions (where it could of course use any font it wanted to!).

> Back to the original discussion related to Windows display of Chinese
> characters,
> we have an application with the same problem on Win2000:
>
> We use SetWindowText() to set the caption of the title bar of windows. We
> have checked that the actual string passed to SetWindowText() is the
correct
> Unicode one.
>
> Here is the problem:
> If running Win2K with the Japanese system Locale, then accented characters
> (e.g. 'ê') will be replaced by ascii ones (e.g. 'e'). This is true only
for
> the title bar of windows (not widgets controlled by our application. These
> display any Unicode character fine).

This can relate to many things.... I suspect it has more to do with a
non-Unicode application and some best-fit mappings? You know, whether you
are creating windows that are, in fact, Unicode?

> If running Win2K with the English system Locale, then Japanese characters
> (e.g. U+ff7d '?') will be replaced by '?'. Again , this is true only for
the
> title bar of windows (not widgets controlled by our application).

This points again to the idea that the main window is going through
CreateWindowExA instead of CreateWindowExW.

> We set the system to Arial Unicode MS or to specific Japanese font but
still
> have the problem. Any idea about any API (other than SetWindowText()) that
> you can use to manipulate the caption?

Well, if forced to stick with CreateWindowExA windows one could always
<shudder> even do owner draw in the non-client area at the time of the
WM_NCCREATE message. But Unicode windows are the non-masochistic solution.

MichKa

Michael Kaplan
Trigeminal Software, Inc.
http://www.trigeminal.com/



This archive was generated by hypermail 2.1.2 : Wed Jul 18 2001 - 18:22:26 EDT