Bug Fix: WM_GETTEXT should return NULL string if LB_GETCURSEL
is LB_ERR
Francois Gouget
fgouget at free.fr
Tue Jul 16 03:46:21 CDT 2002
On Tue, 16 Jul 2002, Dmitry Timoshkov wrote:
[...]
> IMO Wine should not use L prefix at all and explicitly convert ANSI
> to unicode when it's needed or use explicit unicode character constants:
> static const WCHAR fooW[] = {'f','o','o',0};
> but never L"foo".
For character constants, both 'x' and L'x' with work. So it is basically
a matter of style/taste.
But for Unicode strings, neither "foo" nor L"foo" work: one results in
a string with 1 byte character and the other in a string with 4 byte
characters the compiler will not perform any conversion.
So for Unicode string literals, the only option is as you have shown
above:
static const WCHAR fooW[] = {'f','o','o',0};
Clumsy but this is the only way.
(for Winelib we play tricks with WINE_UNICODE_TEXT but these are not
perfect and must not be used in Wine. That's why they are in an #ifndef
__WINE__ anyway)
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
145 = 1! + 4! + 5!
More information about the wine-devel
mailing list