Scaling the non-client area (title bar, menu bar) for per-monitor high-DPI support

后端 未结 2 1366
臣服心动
臣服心动 2020-12-07 20:45

Windows 8.1 introduced the ability to have different DPI settings for different monitors. This feature is known as \"per-monitor high-DPI support.\" It persists and has been

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 21:18

    With Per Monitor V2 DPI awareness in Windows 10 Creators Update (build 15063) you can resolve this easily without the EnableNonClientDpiScaling.

    To enable Per Monitor V2 DPI awareness, while still supporting old Per Monitor DPI awareness on older Windows 10 builds and Windows 8.1 and DPI awareness on yet older versions of Windows, make your application manifest like this:

    
        
        
            
                True/PM
                PerMonitorV2,PerMonitor
            
        
    
    

    References:

    • High DPI Improvements for Desktop App Developers in the Windows 10 Creators Update – video
    • Application Manifests – reference

提交回复
热议问题