[wx-dev] RFC: UTF-8 build mode for wx: wxUSE_UNCODE
Armel Asselin
asselin.armel at wanadoo.fr
Mon Mar 5 03:25:05 PST 2007
> LM> 2. Windows Service, main():
> LM>
> LM> TCHAR exe_path[STRPATHBUFFERLENGTH - 50];
> LM> ::GetModuleFileName(0, exe_path, sizeof(exe_path));
> LM> #if wxUSE_UNICODE
> LM> swprintf(strPath, wxT("%s"), exe_path);
> LM> #else
> LM> sprintf(strPath, "%s", exe_path);
> LM> #endif
>
> Here you use wxUSE_UNICODE as synonym for _UNICODE. I'm tempted to say
> that such usage shouldn't be very common as I hope people would rather
> replace the last 5 lines with a single strPath.Printf(_T("%s"), exe_path)
> statement.
>
> LM> #if wxUSE_UNICODE
> LM> wxArrayString args;
> LM> const wxChar *cmdLine = ::GetCommandLine();
>
> This won't compile as wxChar will be a class. In fact just about anything
> using "wxChar *" won't compile any more.
will we still be able to use things such as const wxChar myconststr[] =
wxT("hello"); ?
Armel
More information about the wx-dev
mailing list