[Bug 7512] Problem with unicode comboboxes

Wine Bugs wine-bugs at winehq.org
Thu Feb 22 15:13:42 CST 2007


http://bugs.winehq.org/show_bug.cgi?id=7512





------- Additional Comments From lightning_uk at imgburn.com  2007-22-02 15:13 -------
Ok, just to update this thread, I've done some debugging on the differences 
between Windows and Wine having read what you've said in this thread about 
problems with the way wndproc is being set/called.

Of course I guess it all really comes down to what 'correct' really means. 
Does it mean doing it right or does it mean emulating windows exact behaviour, 
be it right or wrong?!

Having changed line 1595 in TntStdCtrls.pas from:

SetWindowLongW(EditHandle, GWL_WNDPROC, GetWindowLong(EditHandle, 
GWL_WNDPROC));

to read:

SetWindowLongW(EditHandle, GWL_WNDPROC, GetWindowLongW(EditHandle, 
GWL_WNDPROC));

.... wine then works perfectly.

The trouble is, it then doesn't work under the real Windows.

With a bit of debug info added to my program, here's the output from me 
typing 'testing' into a combobox and then pressing a button to have the 
program examine it.

In Windows:

D 19:35:36 ComboBox's Edit window is Unicode enabled.
D 19:35:36 WM_GETTEXTLENGTH Length = 7
D 19:35:36 WM_GETTEXT Length = 7
D 19:35:36 74 00 00 00 65 00 00 00 73 00 00 00 74 00 <- Note: this is whats in 
the buffer after the WMGETTEXT call.
D 19:35:36 Control->Text Length = 1
D 19:35:36 74 00 

Clearly the byte output should be something more like:

74 00 65 00 73 00 74 00....

In Linux/Wine:

D 19:38:06 ComboBox's Edit window is Unicode enabled.
D 19:38:06 WM_GETTEXTLENGTH Length = 7
D 19:38:06 WM_GETTEXT Length = 7
D 19:38:06 74 00 65 00 73 00 74 00 69 00 6E 00 67 00 
D 19:38:06 Control->Text Length = 7
D 19:38:06 74 00 65 00 73 00 74 00 69 00 6E 00 67 00 

So it looks like it does a double unicode conversion (of sorts!) under windows 
with that line changed.

Being a windows app, I can't go leaving this modification in place as it would 
be breaking the app for the majority of it's users. It is however a shame that 
it won't work for any linux/wine users because of this.

If it's of any interest, I've also started a thread on the Tnt support 
webboards.

http://webboard.ccci.org:8080/~tnt/read?7356,7e#7356

-- 
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