SetProcessDPIAware
SetProcessDPIAware is a Windows API function in user32.dll that marks the calling process as DPI aware. When a process is DPI aware, Windows does not apply DPI virtualization to the process and instead scales UI according to the system DPI. The function is intended for older applications that do not opt into DPI awareness through a manifest or newer APIs.
The prototype is BOOL SetProcessDPIAware(void). It returns a nonzero value if the call succeeds, or zero on
Usage considerations include timing and scope. It should be called early in process initialization, before any
Limitations and modern alternatives: SetProcessDPIAware only enables system-DPI awareness and does not provide per-monitor DPI awareness.