mscao 发表于 2006-3-29 23:20

[求助]在visual studio 2005 中如何定义 _UNICODE ?? 求助

<P><FONT style="BACKGROUND-COLOR: #efefef">在 visual studio 2005 中 没有像 vc.net 2003 中那样很好的支持 Unicode ,</FONT></P>
<P><FONT style="BACKGROUND-COLOR: #efefef">将以前的项目导入到vc 2005 中,总出现 错误 </FONT></P>
<P><FONT style="BACKGROUND-COLOR: #efefef"> error C2664: 'CWinApp::GetProfileIntW' : cannot convert parameter 1 from <FONT color=#ff1493>'const char [12]</FONT>' to '<FONT color=#ff0000>LPCTSTR'</FONT> e:\vc.net\visual studio 2005\projects\...\persist.cpp 108 </FONT></P>
<P><FONT style="BACKGROUND-COLOR: #efefef"> error C2440: 'type cast' : cannot convert from '<FONT color=#ff1493>CString</FONT>' to <FONT color=#ff0000>'const char *'</FONT> e:\vc.net\visual studio 2005\projects\..\persist.cpp 98 <BR></FONT></P>
<P><FONT style="BACKGROUND-COLOR: #efefef"> error C2664: 'void ATL::CStringT&lt;BaseType,StringTraits&gt;::Format(const wchar_t *,...)' : cannot convert parameter 1 from <FONT color=#ff1493>'const char [20]</FONT>' to <FONT color=#ff0000>'const wchar_t</FONT> *' e:\vc.net\visual studio 2005\projects\...\persist.cpp 71 <BR></FONT></P>
<P><FONT style="BACKGROUND-COLOR: #efefef">等错误, 请问该如何很好的解决这个问题, 因为没有定义_UNCODE,则编译器产生的代码将使用普通8位ANSI,?? 我不知道该怎么定义 Unicode 宏??谢谢<BR></P></FONT><!-- End: CommunityServer.Discussions.Controls.PostDisplay.TextPost -->

mscao 发表于 2006-3-31 12:56

我通过修改编译环境的字符集,已经解决,不知还有其他方法没有???

页: [1]

编程论坛