vs2010 MFC所使用字符集不同时导致控件外观不一样的解决办法

方法1:修改stdAfx.h中的代码

#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

方法2:采用.manifest文件修改界面风格



       version="1.0.0.0"
     processorArchitecture="X86"
     name="Microsoft.Windows.dummy"
     type="win32"/>
  Your app description here
 
   
            type="win32"
      name="Microsoft.Windows.Common-Controls"
      version="6.0.0.0"
      processorArchitecture="X86"
      publicKeyToken="6595b64144ccf1df"
      language="*"/>
   

 


(1)将以上内容复制保存为XXX.manifest文件,并作为资源文件加入到工程中,资源ID为IDR_XXX;
(2)如果是.dll工程,则在Resource.h中添加:
   #define IDR_XXX                    200
   并在StdAfx.h中添加
   #define ISOLATION_AWARE_ENABLED    100
(3)如果是.exe工程,则在Resource.h中添加:
   #define IDR_XXX                    100

你可能感兴趣的:(VC++/MFC,visual,studio,2010,控件,mfc)