mfc 按钮变成了非xp风格、界面变成windows经典样式的原因总结
清泛原创
首先看一下xp风格与非xp风格:
还有一种可能,如下:(样式全变成经典风格了)
是由于将生成Manifest清单选项给禁用导致。改为默认“是”后,风格恢复。
非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清单选项给禁用导致。改为默认“是”后,风格恢复。