VS2008 问题汇总

来源:互联网 发布:美国总统访华网络直播 编辑:程序博客网 时间:2024/04/28 12:26

1.中文乱码问题:
在资源视图中,右击对话框IDD,选择属性,将语言更改为Chinese (Simplified, PRC)即可。
 
或者在新建工程时,资源语言选择中文:

2.编译报错,需要编译两次才可以通过。
Project--->xxx Property Pages--->Configuration Properties--->Linker中的Enable Incremental Linking属性改为Default。

3.字符集问题导致编译报错:error C2664: 'strcpy' : cannot convert parameter 2 from 'wchar_t *' to 'const char *'。
Project--->xxx Property Pages--->Configuration Properties中的Character Set配置为Not Set即可。

4.编译为静态库。
Project--->xxx Property Pages--->Configuration Properties中的Use of MFC配置为Use MFC in a Static Library。

或者在新建工程时,选择为静态库即可:

5.改变字符集导致界面变为VC风格。
将文件stdafx.h中的最后关于UNICODE码的宏注释掉即可。
//#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
//#endif

0 0
原创粉丝点击