SetProcessDPIAware function

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.
 
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.

Syntax

BOOL SetProcessDPIAware(

);

Parameters

This function has no parameters.

Return Value

Type: 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

   
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