禁用应用程序的桌面合成

发布于 2024-09-02 07:53:07 字数 88 浏览 4 评论 0原文

如何在 Windows Vista/7 中标记应用程序以通过注册表或 NSIS 脚本禁用桌面合成?

通常,它是在应用程序属性的兼容性设置中完成的。

How do I flag an app in Windows Vista/Seven to disable desktop composition thru registry or NSIS script?

Normally it´s done in Compatibility settings in app´s properties.

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

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

发布评论

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

评论(2

夏花。依旧 2024-09-09 07:53:07

如果确实需要,您可以在注册表中的“SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers”中添加一个条目,其中包含 WriteRegStr 指令(我认为没有官方的 API,因为用户应该控制这些选项,而不是开发人员(毕竟,你可以只需修复损坏的应用程序)有一个名为 SHGetAppCompatFlags 读取标志,但没有“setter” AFAIK

If you really must, you can add an entry in the registry in "SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" with the WriteRegStr instruction (I don't think there is an official API for this since the user is supposed to control those options, not the developer (After all, you can just fix your broken app) There is a undocumented function called SHGetAppCompatFlags to read the flags, but no "setter" AFAIK
)

一个人的夜不怕黑 2024-09-09 07:53:07

当您的应用程序启动时,使用 关闭合成DwmEnableComposition

DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);

这将禁用组合,直到(您的)违规进程退出。

注意:此 API 不会修改用户的组合首选项 - 只是您的应用程序不兼容。

When your application starts turn off composition using DwmEnableComposition:

DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);

This will disable composition until the (your) offending process exits.

Note: This API doesn't modify the user's preference for composition - only that your application is incompatible.

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