Automatic ANSI<>Unicode message translation

Phil Krylov phil at
Sun Aug 21 10:31:41 CDT 2005

On Tue, 26 Jul 2005 21:26:29 +0900
"Dmitry Timoshkov" <dmitry at> wrote:

> "Phil Krylov" <phil at> wrote:
> > Oh sorry. For some reason I thought that HIWORD(wParam) is used for some
> > other data. Here is a new patch, is it ok?
> Looks good to me, let's see if Alexandre likes it as well.

Still it is not the best. Now, WM_CHARs posted by PostMessageA and
dispatched using GetMessageA work well (are converted back and forth). But
when the message loop uses GetMessageW, these WM_CHARs come to the window
procedure as 4-byte "garbage" (WCHAR which is converted from CP_ACP to
2 WCHARs). In Windows, the window procedure receives unchanged code...

(See attached test).

-- Ph.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msgchar.c
Type: text/x-csrc
Size: 1253 bytes
Desc: not available
Url :

More information about the wine-devel mailing list