VS2012中MFC的对话框界面风格问题

以前在XP写的程序,现在系统换成了WIN7,现在对话框在编辑和预览的时候显示都如图一所示,可实际编译生成之后的显示却如图二所示,是什么问题?如何设置两者的显示风格使其保持一致?

点击查看原始尺寸

点击查看原始尺寸

------------------------------------------------------------------------------------------------------

猫腻在stdafx.h中.

看这个文件中是否有

  
  1. #ifdef _UNICODE
  2. #if defined _M_IX86
  3. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
  4. #elif defined _M_IA64
  5. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  6. #elif defined _M_X64
  7. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  8. #else
  9. #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
  10. #endif
  11. #endif

如果有, 还是界面风格不正确, 那么上面的代码去掉ifdef _UNICODE宏.

一般都是由于你的程序环境使用的是多字符集造成的.

转自:http://www.dewen.org/q/13588/VS2008%E4%B8%ADMFC%E7%9A%84%E5%AF%B9%E8%AF%9D%E6%A1%86%E7%95%8C%E9%9D%A2%E9%A3%8E%E6%A0%BC%E9%97%AE%E9%A2%98%E6%B1%82%E6%95%99%EF%BC%81

展开阅读全文

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