[ros-kernel] Re: Status of Explorer under ReactOS - Bug #42
Martin Fuchs
martin-fuchs at gmx.net
Sat Nov 8 02:00:01 CET 2003
Hello,
I took a look at Bug #42 (start menu entries are not displayed correctly).
This is the problem:
Start menu uses the predefined control class "BUTTON".
This window class is registered in RegisterBuiltinClass() (regcontrol.c) using RegisterClassW(). So it uses the unicide window preocedure ButtonWndProcW(). When painting the start menu in explorer, it gets the button texts using GetWindowTextA(). This function sends WM_GETTEXT to the buttons, so it calls DefWindowProcW() in defwnd.c.
Now here is the real problem:
Because the control class was registered as Uncicode, it returns, the window text as Unicode. But GetWindowTextA() expects an 8 bit ASCII result!
There is missing a distinction between sending WM_GETTEXT to a window, that was created by calling CreateWindowExA() and to a window, that was created by CreateWindowExW(). I think the information in WindowObject->Unicode should be enough to decide this.
But I looked into NtUserCreateWindowEx(). It is implemented using:
WindowObject->Unicode = ClassObject->Unicode;
I don't think, this is correct. WindowObject->Unicode should only be set to TRUE when calling CreateWindowExW(), not CreateWindowExA(), shouldn't it?
Martin
More information about the Ros-kernel
mailing list