窗户如何改变 Aero Glass 的颜色? [英] How does Windows change Aero Glass color?

查看:23
本文介绍了窗户如何改变 Aero Glass 的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Windows 7 RTM,我想知道控制面板如何能够如此顺利地更新 Aero Glass 颜色而无需重新启动 DWM (uxsms).DwmSetColorizationColor 不再起作用...

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...

推荐答案

您应该对以下方法感兴趣:

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;
}

确保在调用 DwmSetColorizationParameters 方法之前先调用 DwmIsCompositionEnabled 否则它会失败.

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)

这篇关于窗户如何改变 Aero Glass 的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆