首页 > 解决方案 > 在 Windows 7 上检查另一个进程是否支持 DPI

问题描述

如何在 Windows 7 上检查另一个进程是否支持 dpi?我知道有IsProcessDPIAware(),但这仅适用于调用进程(我宁愿不走 dll 注入的路线)。另一种选择是检查HIGHDPIAWARE注册表中是否设置了标志,但我不知道这是否可靠,我认为它不是很快!?

还有其他更好的选择吗?

标签: c++winapiwindows-7

解决方案


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.


推荐阅读