将VS6 MFC对话框应用程序的外观升级到VS2008

发布于 2024-11-08 23:02:00 字数 165 浏览 2 评论 0原文

我正在将 VS6 MFC 对话框应用程序更新到 VS2008。更新代码很容易,但对话框仍然具有老式 VS6 的外观。例如,组框具有方形边缘并且为深灰色。而不是 VS2008 应用程序 Group Box 的圆角和浅灰色。

如何强制我的应用程序使用 VS2008 MFC 对话框应用程序的更现代的外观?

I'm updating a VS6 MFC dialog application to VS2008. Updating the code has been easy, but the dialog still has the old fashioned VS6 appearance to it. For example, the Group Boxes have square edges and are dark grey. Instead of the rounded corners and light grey of a VS2008 application Group Box.

How can I force my application to use the more modern appearance of VS2008 MFC dialog applications?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风为裳 2024-11-15 23:02:00

新的 MFC 项目将向 stdafx.h 添加以下内容:

// Define manifest directives to match platform
#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

我还将以下内容添加到我的项目中,以显式链接到 UXTHEME.LIB,该库对基本控件进行子类化以添加主题支持:

#ifdef _UXTHEME_H_
#pragma message( "Including uxtheme.lib for linking" )
#pragma comment(lib, "uxtheme.lib")
#endif

A new MFC project will add the following to stdafx.h:

// Define manifest directives to match platform
#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

I also add the following to my projects to explictedly link to the UXTHEME.LIB which sub-classes basic controls to add theme support:

#ifdef _UXTHEME_H_
#pragma message( "Including uxtheme.lib for linking" )
#pragma comment(lib, "uxtheme.lib")
#endif
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文