Solution:
Root Cause: Static System DPI Awareness Lock
Applications compiled with basic 'System DPI Aware' flags query display metrics only once during process initialization (WM_CREATE). They query the DPI of the primary monitor at login time. If the system scale is altered post-login, or if the primary display differs in scale from secondary displays, the application fails to recalculate non-client area elements and font metrics, causing blurred GDI text drawing calls.
# Diagnostic Verification:
Inspect Task Manager's DPI Awareness column for the application process; it will display System.Observe that text elements rendered via standard GDI calls (e.g., menus, dialog boxes) are fuzzy while custom controls remain sharp.# Step-by-Step Fix:
1. Enable GDI DPI Scaling via Registry:
Windows 10 (1703+) and Windows 11 include a native GDI scaling engine that automatically vector-scales GDI primitives (text, lines) without bitmap stretching.Open Regedit and navigate to: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
Create a String value named with the full path to your application binary (e.g., C:\Tools\App.exe).Set its value data to: GDIDPISCALING HIGHDPIAWARE
2. Force External Manifest Lookup via Registry:
Force Windows to prioritize external .manifest sidecar files over internal embedded manifests: cmd
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide" /v PreferExternalManifest /t REG_DWORD /d 1 /f
3. Create External Manifest File:
In the application installation directory, create a file named App.exe.manifest containing: xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings>
<dpiAwareness xmlns="[http://schemas.microsoft.com/Smapi/2016/WindowsSettings](http://schemas.microsoft.com/Smapi/2016/WindowsSettings)">PerMonitorV2, PerMonitor</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
# Prevention & Long-Term Monitoring:
Ensure PreferExternalManifest registry settings are managed via Group Policy Objects (GPO) across workstation environments.