gpt4 book ai didi

c++ - 以编程方式更改系统视觉效果

转载 作者:行者123 更新时间:2023-11-28 04:03:53 25 4
gpt4 key购买 nike

我需要一些提示,以了解我需要在用 C++(使用 MFC)开发的项目中进行的一些更改;特别是,我想更改 Windows 10 的一些视觉效果设置:

  • 是否可以通过编程方式停用“系统属性-> 高级-> 性能-> 设置-> 视觉效果”下的“动画化窗口内的控件和元素”选项?

enter image description here

  • 我可以只为我的应用程序更改此选项,而不是在系统级别全局更改吗?

在此先感谢您的帮助!

最佳答案

您可以通过设置 SPI_SETCLIENTAREANIMATION 禁用“窗口内的动画控件和元素”。

SPI_SETCLIENTAREAANIMATION: Turns client area animations on or off. The pvParam parameter is a BOOL variable. Set pvParam to TRUE to enable animations and other transient effects in the client area, or FALSE to disable them. Display features such as flashing, blinking, flickering, and moving content can cause seizures in users with photo-sensitive epilepsy. This flag enables you to enable or disable all such animations.

Windows Server 2003 and Windows XP/2000: This parameter is not supported.

然后你使用SystemParametersInfo使其有效。

代码:

SystemParametersInfo(SPI_SETCLIENTAREAANIMATION, 0, (PVOID)FALSE, SPIF_UPDATEINIFILE); 

注意:

此函数旨在与允许用户自定义环境的应用程序一起使用。

因此您不能仅为您的应用程序更改此选项。

关于c++ - 以编程方式更改系统视觉效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59067039/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com