本文介绍了按钮样式更改为win2000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将PC从WinXp更改为Win7.但是我继续使用VS2005.
现在,一个旧项目(可以用VS2002创建)具有奇怪的行为.
所有的按钮/编辑样式都没有视觉效果,并且具有win2000的外观. (在XP上没有发生)
此图像说明了问题:
链接 [ ^ ]:混淆:

更为奇怪的是,如果我运行应用程序ouside VS,则样式都可以,但是在调试时,它们又回到了win2000样式(调试和发行版).

我创建了一个新的空MDI-MFC应用程序(类似于原始应用程序),然后运行到VS中,样式就可以了. .
将差异搜索到2个文件夹中时,我在项目文件中发现了一些差异.但是我认为不是重要的细节.
奇怪的是,在新应用程序中绝对缺少清单...问题可能与该文件有关吗?:〜

我还找到了任何可以解释该问题的文章...您有没有向我建议的链接? :doh:

谢谢

I changed my pc from WinXp to Win7. But I''m continuing to use VS2005.
Now an old project (may be created with VS2002) have a strange behaviour.
All the button/edit style has no visual effect and it has the look of win2000. (On XP this was not happens)
This image explains the problem:
link[^]:confused:

The more strange thing is that if I run the application ouside VS the style are all ok, but when debugging they came back to win2000 style (both debug and release).

I create a new empty MDI-MFC application (like the original one) and then running into VS the styles are ok X| .
Searcing for differences into the 2 folders I found some differences in the project file. But I think not important details.
One strange thing is that in the new application is absolutely missing the manifest... can the problem be related to that file?:~

I found also any article that explain the problem... do you have any link to suggest to me? :doh:

Thanks

推荐答案


#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


稍后,清单工具(即 mt.exe )将使用这些信息来创建清单,并将其嵌入到可执行文件的资源中(在链接步骤之后). /li>


This informations are used later by the Manifest Tool (i.e. mt.exe) to create a manifest and embed it into the resources of the executable (after the linking step).


这篇关于按钮样式更改为win2000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 07:40