Windows Visual Themes: Gallery of Parts and States?
Microsoft Windows lets programmers draw GUI elements using the look and feel of the current theme using functions like DrawThemeBackground
and DrawThemeText
. The elements are specified by Class, Part, and State, as described at the Parts and States page at MSDN.
Unfortunately, the page is not very informative (at all!). So the question is: is there somewhe开发者_高级运维re a reference of all these parts and states, preferably with images of the elements (in the default Windows Vista/7 theme)?
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.
(High-Res)
It can be downloaded at
- https://privat.rejbrand.se/UxExplore.exe
The (Delphi, Win32 API) source, which is too long to be posted here (due to hundreds of constants) is found at
- https://privat.rejbrand.se/UxExplore.zip
- https://privat.rejbrand.se/UxExploreMain.html
- https://privat.rejbrand.se/UxExploreConsts.html
You're looking for this.
Mike Lische, who wrote the first Theme support for Delphi (which was later absorbed by Borland) has a very good Theme Explorer demo application:
It's not been updated to support new Windows 7 common controls, but its parts/states explorer is very pretty.
And if i may say, Andreas, a design you might want to copy for yours :)
Much more comprehensive theme explorer: mCtrl Theme Explorer
精彩评论