SetProcessDPIAware function (winuser.h)

Sets the process-default DPI awareness to system-DPI awareness. This is equivalent to calling SetProcessDpiAwarenessContext with a DPI_AWARENESS_CONTEXT value of DPI_AWARENESS_CONTEXT_SYSTEM_AWARE.

Note

It is recommended that you set the process-default DPI awareness via application manifest, not an API call. See Setting the default DPI awareness for a process for more information. Setting the process-default DPI awareness via API call can lead to unexpected application behavior.

Syntax

BOOL SetProcessDPIAware();

Return value

Type: BOOL

If the function succeeds, the return value is nonzero. Otherwise, the return value is zero.

Remarks

For more information, see Setting the default DPI awareness for a process.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See also

Setting the default DPI awareness for a process