--- Shachar Shemesh wine-devel@sun.consumer.org.il wrote: [skipped]
The WM_GETTEXTLENGTH MSDN only says that this should be the number of TCHARs returned. nothing about it being an upper bound. If so, any time we reach this code, we potentially return the wrong value, and hence my suggestion for a "FIXME" there.
It also says: "Under certain conditions, the DefWindowProc function returns a value that is larger than the actual length of the text. This occurs with certain mixtures of ANSI and Unicode, and is due to the system allowing for the possible existence of double-byte character set (DBCS) characters within the text. The return value, however, will always be at least as large as the actual length of the text; you can thus always use it to guide buffer allocation."
So, I assume that correct application *should* account on such possibility, but I do not account that all applications do ;-)
Andriy
__________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com