`
jiagou
  • 浏览: 2532200 次
文章分类
社区版块
存档分类
最新评论

对话框界面风格的问题

 
阅读更多

在用VS2010用MFC开发对话框程序时,如果我们在工程属性内将Character Set属性设置为:Use Multi-Byte Character Set.

那么默认情况下对话框的风格是win2K的,为什么会这样呢?

打开stdafx.h头文件,找到以下内容:

#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_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


注释掉最外层的

//#ifdef _UNICODE

//#endif

即可,这样,对话框界面风格就变成你的系统风格了,如果你用的是WIN7的话,对话框即为WIN7风格了,而不再是WIN2K的了.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics