GetThreadDpiAwarenessContext function (winuser.h)

Gets the DPI_AWARENESS_CONTEXT for the current thread.

Syntax

DPI_AWARENESS_CONTEXT GetThreadDpiAwarenessContext();

Return value

The current DPI_AWARENESS_CONTEXT for the thread.

Remarks

This method will return the latest DPI_AWARENESS_CONTEXT sent to SetThreadDpiAwarenessContext. If SetThreadDpiAwarenessContext was never called for this thread, then the return value will equal the default DPI_AWARENESS_CONTEXT for the process.

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

SetThreadDpiAwarenessContext