GetWindowDpiAwarenessContext function

Returns the DPI_AWARENESS_CONTEXT associated with a window.

Syntax

DPI_AWARENESS_CONTEXT GetWindowDpiAwarenessContext(
  HWND hwnd
);

Parameters

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

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

See Also

DPI_AWARENESS

GetAwarenessFromDpiAwarenessContext