Unicode Support
-
how do i use unicode support in MFC to create menu in other international spoken language that has support only as uniocode characters.i am not an expert in VC++ so please have a beginners approach.i use VC++ 6.0 and winxp operating system
First you'll need to define UNICODE and _UNICODE. After that you'll need to use Unicode-aware functions, methods, and types (e.g.,
LPTSTR
) .CString
is already Unicode-aware so nothing special needs to be done with it. For string literals, prepend them with an L.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
First you'll need to define UNICODE and _UNICODE. After that you'll need to use Unicode-aware functions, methods, and types (e.g.,
LPTSTR
) .CString
is already Unicode-aware so nothing special needs to be done with it. For string literals, prepend them with an L.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
In addition you also have to set the entry point symbol to
wWinMainCRTStartup
. This can be done in the Project->Settings menu->Link tab->Output Category->Entry-point symbol. Also IMO, one is better off using the TCHAR macros rather then hard coding the unicode functions and string literals.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004