|
From: Tor L. <tm...@ik...> - 2009-06-14 08:02:13
|
> I have a application which compiles with mingw gcc as a non unicode > version and all seems to be fine and working. If WinMain is the only problem you have, you will be glad to know that you can write a fully working "Unicode" application also with a main(). Just fetch the command line using the wide character API and parse it into a wide character string array. I.e.: wchar_t **wargv = CommandLineToArgvW(GetCommandLineW(), &argc); But in general the concept that one should build one's application as separate "non-Unicode" and "Unicode" versions is quite obsolete. (If you really have to support Win9x, then OK, but I feel sorry for you.) IMHO, in a newly written (or actively maintained) application, there is no need to keep using those extremely ugly historical conventions from the <tchar.h> header. All that TCHAR and TEXT crap deserves to die. Just use wchar_t strings, wide character literals (L"like this"), wcs*() functions, and the W version of the Windows API explicitly, etc, as appropriate, and your application will be a "Unicode" one. --tml |