Skip to content

Window Frames

nptr edited this page Feb 25, 2022 · 8 revisions

There are two different locations for the window frames and other components. The Window class and the DWMWindow class.

  • Window is a lightweight window scaffolding that is used when you disable "Aero Glass, "window transparency or you see for a few seconds when the DWM ("Desktop Window Manager") crashes. It's what the "Aero Basic" design was implemented with.
  • DWMWindow is the default nowadays and supports transparency. I'll thus focus on it here, and because it's a bit more complex.

The Image Atlas

For the DWMWindow class, there is just one image resource that holds all components of the window. Such an image is called an "image atlas". Its located in DWMWindow > Common Properties > IMAGEATLAS and is an image that is supposed to be exported, modified externally and re-imported. The parts of DWMWindow, such as CLOSEBUTTON just reference a part of this image via their ATLASRECT property.

In the screenshot below you can see a part of the atlas in the "Image View" and the ATLASRECT property (of CLOSEBUTTON in this case) in the "Property View".

DWMImageAtlas

Once you exported the atlas, you will be able to identify most parts in it quickly. If not, you have to work the other way round and come from the parts ATLASRECT property. At the time of writing, there is no feature in msstyleEditor to lookup/extract/replace just a single part of an atlas.

Part Map - Easy

The first part is rather self explanatory. In the image below you see the most important parts marked. Not shown is for example is the rare HELPBUTTON but that is handled analog to the MIN/MAX/RESTORE buttons. Also not shown are the BUTTONGLOW items which are just the mouse over effects.

Class Name / Location Window Inactive & Active
  1. DWMWindow > FRAME[L/T/R/B]
  2. DWMWindow > MINBUTTON_GLYPH_[DPI]
  3. DWMWindow > MAXBUTTON_GLYPH_[DPI]
  4. DWMWindow > CLOSEBUTTON_GLYPH_[DPI]
  5. DWMWindow > MINBUTTON[INACTIVE]
  6. DWMWindow > RESTOREBUTTON[INACTIVE]
  7. DWMWindow > CLOSEBUTTON[INACTIVE]
  8. DWMWindow > TOOLFRAME[L/T/R/B]
  9. DWMWindow > [TOOL]FRAME[L/T/R/B]SHADOW

Windows

Part Map - Advanced

TODO