On 04.09.2005 16:47, Michael Kaufmann wrote:
Hi Frank,
One of your theming patches ( http://www.winehq.org/hypermail/wine-cvs/2005/08/0313.html ) has caused a problem in many Delphi applications. The edit controls of Delphi applications are now created in Unicode mode. I hope you have an idea why this happens... Of course Delphi applications are ANSI and expect ANSI controls in their windows.
I know.
Because the Delphi edit controls are now in Unicode mode, the messages sent to them have to be translated from ANSI to Unicode and back. When a program reads the "Text" property of a TEdit control, Delphi sends a WM_GETTEXTLENGTH message. Wine doubles the return value when translating back from Unicode to ANSI because of double-byte character sets. (dlls/user/winproc.c)
Windows (2k+ at least) in this case actually also sends a Unicode WM_GETTEXT in this case and determines the true ANSI length from the Unicode string. Wine should (IMO) be fixed to do the same.
Try this patch: http://www.winehq.org/pipermail/wine-patches/2005-August/020285.html Unfortunately, it is as-is not CVS-worthy...
-f.r.