用unicode码来显示汉字

unsigned int aa[] = {0x554a};
CString str((LPCWSTR )aa);

MessageBox(str);

汉字“啊”的unicode码为0x554a,那在知道这个码的前提下要想显示出“啊”来可以用上所示的代码

依据CString的构造函数中有一个

	CString( LPCWSTR lpsz )   Constructs a CString from a Unicode string
	可见构造函数的作用还是极其大的。

posted @ 2012-11-20 14:35  ECDP  阅读(230)  评论(0编辑  收藏  举报