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...
Asked
Active
Viewed 3,555 times
1 Answers
11
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)
-
1+1 to counteract a stupd -1. This answer is an answer to the question "How does it do..." This is probably exactly how it does it. Although i read the original question as "How *does* it do..." and not "*How* does it do..." – Ian Boyd Dec 04 '09 at 16:22
-
In Windows 7 the original method DWMSetColorization throws an exception (it was supported in Windows Vista though). I assume it was his intention to find a new method that offers the same functionality as the old one. One option is to write a .theme file and execute that or use the undocumented method I specified above. – Yvo Dec 06 '09 at 13:09