GetWindowDpiAwarenessContext function (winuser.h)

Returns the DPI_AWARENESS_CONTEXT associated with a window.

Syntax

DPI_AWARENESS_CONTEXT GetWindowDpiAwarenessContext(
  [in] HWND hwnd
);

Parameters

[in] hwnd

The window to query.

Return value

The DPI_AWARENESS_CONTEXT for the provided window. If the window is not valid, the return value is NULL.

Remarks

Important  

The return value of GetWindowDpiAwarenessContext is not affected by the DPI_AWARENESS of the current thread. It only indicates the context of the window specified by the hwnd input parameter.

 

Requirements

Requirement Value
Minimum supported client Windows 10, version 1607 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See also

DPI_AWARENESS

GetAwarenessFromDpiAwarenessContext