[Bug 7512] Problem with unicode comboboxes
Wine Bugs
wine-bugs at winehq.org
Wed Jul 11 03:41:52 CDT 2007
http://bugs.winehq.org/show_bug.cgi?id=7512
------- Additional Comments From dmda at yandex.ru 2007-11-07 03:41 -------
in my case the code is
ComboHandle = CreateWindowExW(0, L"COMBOBOX", 0, 0x44210242, 55, 30, 190,
21, ParentWnd, 0, HInstance, 0);
ShowWindow(ComboHandle, SW_NORMAL);
// 3rd party library begins:
EditHandle = GetWindow(ComboHandle, GW_CHILD);
DefEditProc = GetWindowLongA(EditHandle, GWL_WNDPROC);
SetWindowLongA(EditHandle, GWL_WNDPROC, DefEditProc);
// 3rd party library end.
SetWindowLongW(EditHandle, GWL_WNDPROC, GetWindowLong(EditHandle,
GWL_WNDPROC)); // this call is a fixup to trigger EditHandle into unicode and
...
SetWindowTextW(ComboHandle, L"Any Text"); // will display only "A"
It works fine under Windows. Indeed, SetWindowLongA() turns handler to non-
unicode WNDPROC and next call to SetWindowLongW() returns it back to unicode.
Windows recognizes it per following:
Even if you call SetWindowLongA() and provide NULL WndProc or WndProc pointing
to USER32 class handler, it will become/stay UNICODE
If you call SetWindowLongA() and provide custom WndProc, it will become ANSI
If you call SetWindowLongW() and provide any WndProc it will become UNICODE
Under Wine it looks pretty similar and according to IsWindowUnicode() HANDLE
becomes first non-uncode then returns back to unicode mode, but it stops
processing SetWindowTextW() as unicode and expects ANSI string passed to this
function. Definitely it's a bug in Wine :-)
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list