UCS-4 hack not working in resource files.

carlo.bramix at libero.it carlo.bramix at libero.it
Fri Sep 10 07:07:36 CDT 2010

Hello friends,
I would like to talk a bit about a (probable) limitation with unicode names 
when they are used for creating embedded controls in resource files.
Let's take for example this piece of code from richedit.h:

#if defined(__GNUC__)
# define RICHEDIT_CLASS20W (const WCHAR []){ 
'R','i','c','h','E','d','i','t','2','0','W',0 }
#elif defined(_MSC_VER)
# define RICHEDIT_CLASS20W      L"RichEdit20W"
static const WCHAR RICHEDIT_CLASS20W[] = { 
'R','i','c','h','E','d','i','t','2','0','W',0 };

Because the famous UCS-4 "issue", the control name is splitted in its single 
While this can work in almost all situations with C/C++ sources, it is 
absolutely not possible to put a richedit control in RC files.
For example, if I put a Richedit control into a dialog box, it will crash 
since the letter by letter format won't be recognized by the resource compiler.

More information about the wine-devel mailing list