windows 桌面开发有相关指南,叫 DPI Awareness
https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows你可以参考一下
DPI Unaware
DPI unaware applications render at a fixed DPI value of 96 (100%). Whenever these applications are run on a screen with a display scale greater than 96 DPI, Windows will stretch the application bitmap to the expected physical size. This results in the application appearing blurry.
所以在高分辨率下,很多不支持 DPI Awareness 的旧桌面程序打开,使用的仍是小尺寸的位图,结果就被系统强行拉伸,造成模糊(blurry).
要支持 DPI Awareness 就要给程序不同尺寸的位图,来适配不同大小的分辨率.REF 里列出了需要用到的 API.