Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Windows change Aero Glass color?

Tags:

colors

aero

dwm

I'm using Windows 7 RTM and I wonder how the control panel is able to update the Aero Glass color so smoothly without restarting the DWM (uxsms). DwmSetColorizationColor isn't working any more...

like image 877
Fred Avatar asked Sep 28 '09 16:09

Fred


1 Answers

The following methods should be of interest to you:

[DllImport("dwmapi.dll", EntryPoint = "#127", PreserveSig = false)]
public static extern void DwmGetColorizationParameters(out WDM_COLORIZATION_PARAMS parameters);
    
[DllImport("dwmapi.dll", EntryPoint = "#131", PreserveSig = false)]
public static extern void DwmSetColorizationParameters(WDM_COLORIZATION_PARAMS parameters, uint uUnknown);
    
public struct WDM_COLORIZATION_PARAMS {
    public uint Color1;
    public uint Color2;
    public uint Intensity;
    public uint Unknown1;
    public uint Unknown2;
    public uint Unknown3;
    public uint Opaque;
}

Make sure you make a call to DwmIsCompositionEnabled before calling the DwmSetColorizationParameters method or it will fail.

As you can see some of the arguments/properties are unknown.
For more information, here is a link (in German)

like image 104
Zyphrax Avatar answered Sep 28 '22 06:09

Zyphrax