还在苦苦敲代码开发APP?你out啦! 试试积木搭建APP吧~

mfc 按钮变成了非xp风格、界面变成windows经典样式的原因总结

来源:清泛原创     2016-06-07 14:04:16    人气:     我有话说( 0 人参与)

首先看一下xp风格与非xp风格:  非xp风格          xp风格stdafx.h中添加:#ifdef _UNICODE#if defined _M_IX86#pragma co...

首先看一下xp风格与非xp风格:

 

  非xp风格          xp风格



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_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
-----------------------------------------------------------------------------------------------
还有一种可能,如下:(样式全变成经典风格了)
 
是由于将生成Manifest清单选项给禁用导致。改为默认“是”后,风格恢复。

样式 按钮 界面

注:本文为本站或本站会员原创优质内容,版权属于原作者及清泛网所有,
欢迎转载,转载时须注明版权并添加来源链接,谢谢合作! (编辑:admin)
分享到: