Windows 视觉主题:部件和状态库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4009701/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:28:23  来源:igfitidea点击:

Windows Visual Themes: Gallery of Parts and States?

windowsdelphiwinapireferencethemes

提问by Andreas Rejbrand

Microsoft Windows lets programmers draw GUI elements using the look and feel of the current theme using functions like DrawThemeBackgroundand DrawThemeText. The elements are specified by Class, Part, and State, as described at the Parts and Statespage at MSDN.

微软的Windows程序员可以使用绘制使用功能,如当前主题的外观和感觉的GUI元素DrawThemeBackgroundDrawThemeText。这些元素由类、部件和状态指定,如MSDN的部件和状态页面所述。

Unfortunately, the page is not very informative (at all!). So the question is: is there somewhere a reference of all these parts and states, preferably with images of the elements (in the default Windows Vista/7 theme)?

不幸的是,该页面的信息量并不大(根本没有!)。所以问题是:是否有所有这些部分和状态的参考,最好是元素的图像(在默认的 Windows Vista/7 主题中)?

回答by Andreas Rejbrand

I have created a small Windows application, programmed with the table at Parts and States. This application lets the programmer browse and explore all parts and states, using the current OS theme.

我创建了一个小的 Windows 应用程序,使用Parts 和 States 中的表进行编程。该应用程序允许程序员使用当前的操作系统主题浏览和探索所有部件和状态。

Parts and States Explorer
(High-Res)

零件和状态浏览器
(高分辨率)

It can be downloaded at

它可以在

The (Delphi, Win32 API) source, which is too long to be posted here (due to hundreds of constants) is found at

(Delphi, Win32 API) 源码,太长了不能贴在这里(因为有数百个常量)在

回答by SLaks

You're looking for this.

你正在寻找这个

Screenshot

截屏

回答by Ian Boyd

Mike Lische, who wrote the first Theme support for Delphi (which was later absorbed by Borland) has a very good Theme Explorerdemo application:

Mike Lische 为 Delphi 编写了第一个 Theme 支持(后来被 Borland 吸收),他有一个非常好的Theme Explorer演示应用程序:

alt text

替代文字

It's not been updated to support new Windows 7 common controls, but its parts/states explorer is very pretty.

它没有更新以支持新的 Windows 7 通用控件,但它的部件/状态浏览器非常漂亮。

And if i may say, Andreas, a design you might want to copy for yours :)

如果我可以说,安德烈亚斯,你可能想为你复制一个设计:)

回答by Nedko

Much more comprehensive theme explorer: mCtrl Theme Explorer

更全面的主题浏览器:mCtrl Theme Explorer

mCtrl Theme Explorer

mCtrl 主题浏览器