c++ - 在 Windows 7 上检查另一个进程是否支持 DPI
问题描述
如何在 Windows 7 上检查另一个进程是否支持 dpi?我知道有IsProcessDPIAware()
,但这仅适用于调用进程(我宁愿不走 dll 注入的路线)。另一种选择是检查HIGHDPIAWARE
注册表中是否设置了标志,但我不知道这是否可靠,我认为它不是很快!?
还有其他更好的选择吗?
解决方案
According to the doc:
Previous versions of Windows(which means < 8.1) required you to set the DPI awareness for the entire application. Now the DPI awareness is tied to individual threads, processes, or windows. This means that the DPI awareness can change while the app is running and that multiple windows can have their own independent DPI awareness values.
In previous versions of Windows, DPI values were only set once for an entire application.
So check the registry setting of HIGHDPIAWARE
flag in Window 7 is reliable and that's the way to check the another process's DPI Awareness.
推荐阅读
- python - 根据列名中的模式对列求和
- java - LocalCluster 中的不同拓扑是否可以在 apache-storm 中具有相同名称的流和螺栓
- ruby-on-rails - 在 RSpec 中获取 html 电子邮件的全文内容
- spring - Spring安全根认证
- python - pydev 在正常与调试模式下执行脚本
- lambda - lambda 表达式中的可调用结构
- google-apps-script - 在 Appmaker 中生成唯一 ID
- java - 将 Spring Boot 2.0.1 升级到 Spring 2.0.4
- cassandra - 关于复制设置的 nodetool 状态说明实际上是什么意思?
- python - 如何计算功率谱下的面积以测试它是否等于 rms 值(FFT,python,信号处理)