MFC程序字符集改变后界面风格改变

版权声明:转载请注明出处。 https://blog.csdn.net/yangyang031213/article/details/79023208

VS2015 MFC 界面程序字符集由 Unicode 变为多字节后,界面风格变成了 VC6 MFC控件的风格了,如下图:
这里写图片描述
解决方法:
修改 stdafx.h 中自动生成的代码,去掉 #ifdef _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_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

修改后界面变正常了:
这里写图片描述

展开阅读全文

没有更多推荐了,返回首页