Windows 如何改变 Aero Glass 颜色?

发布于 2024-08-05 20:27:01 字数 116 浏览 2 评论 0原文

我使用的是 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...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

晚风撩人 2024-08-12 20:27:01

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

[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,否则将会失败。

正如您所看到的,一些参数/属性是未知的。
有关详细信息,请参阅 链接(德语)

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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文