Regards
Are you referencing WinMain directly? Unicode apps have wWinMain (notice the 'w'). You haven't provided enough detail to fully
answer your question, I'm afraid.
Also you say "_T data type mappings", I trust you mean the things from tchar.h, right? Like _T(), LPCTSTR, etc.
To add to Scot's answer, I think that you will find Mihai's blog
"Internationalization Cookbook" to be very useful.
For example, this post:
"Visual Studio Unicode projects"
http://www.mihai-nita.net/article.php?artID=20060723a
offers you a visual guide with screenshots on how to compile Unicode
projects with VC6 and newer IDEs.
And there are other interesting posts as well, e.g.:
What is a "Unicode application"?
http://www.mihai-nita.net/article.php?artID=20060317a
HTH,
Giovanni
1. Use _UNICODE, UNICODE (in case of MFC) flags for settings.
2. Use _t* family functions.
3. Use _T or TEXT macros to declare constant strings. It maps to either
ascii or unicode string based on preprocessor settings.
4. in case of dialog box based application, go to project -> settings ->
link -> output, add this wWinMainCRTStartup.
5. User WideCharToMultiByte() and MultiByteToWideChar() functions to convert
data from ascii to unicode vice versa.
Regards,
jjoohhnn.
"singurd" <sin...@yahoo.com> wrote in message
news:c569e884-e8ff-4bc2...@d4g2000yqa.googlegroups.com...
Aha , i missed the wWinMainCRTStartup setting.. mihai article is a
dummy's guide for unicode project settings
Thanks for all the reply
> 5. User WideCharToMultiByte() and MultiByteToWideChar() functions to convert
> data from ascii to unicode vice versa.
Or, in addition, the OP might use the C<from>2<to> helper classes (like
CA2U, CA2T, CT2A, etc. ...), which hide the complexity of the
aforementioned Win32 APIs:
"ATL and MFC String Conversion Macros"
http://msdn.microsoft.com/en-us/library/87zae4a3(VS.80).aspx
Another suggestion I would add to jjoohhnn's list is to pay attention to
those parts of code that process the size of char buffers.
I mean: old ASCII-only (Unicode *un*aware) C/C++ code tended to use
sizeof() to get the count of char's in an array (like an array size);
but if this code is converted to Unicode, and TCHAR's are used instead
of char's in this upgrading process, then it is better to use the
_countof() macro instead of sizeof() to get the count of TCHAR's in the
array, because the _countof() macro will return the correct count in
both char's and wchar_t's cases (in fact, a char is 1 byte in size,
instead a wchar_t is 2 bytes; so, sizeof() == _countof() only in case of
char's arrays).
Giovanni
replace your winmain() to _twinmain()
--
Mihai Nita [Microsoft MVP, Visual C++]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email