High DPI

Overview of the High DPI technology.

To develop High DPI, you need these headers:

For programming guidance for this technology, see:

Enumerations

 
DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS

Describes per-monitor DPI scaling behavior overrides for child windows within dialogs. The values in this enumeration are bitfields and can be combined.
DIALOG_DPI_CHANGE_BEHAVIORS

In Per Monitor v2 contexts, dialogs will automatically respond to DPI changes by resizing themselves and re-computing the positions of their child windows (here referred to as re-layouting).
DPI_AWARENESS

Identifies the dots per inch (dpi) setting for a thread, process, or window.
DPI_HOSTING_BEHAVIOR

Identifies the DPI hosting behavior for a window. This behavior allows windows created in the thread to host child windows with a different DPI_AWARENESS_CONTEXT.
MONITOR_DPI_TYPE

Identifies the dots per inch (dpi) setting for a monitor.
PROCESS_DPI_AWARENESS

Identifies dots per inch (dpi) awareness values. DPI awareness indicates how much scaling work an application performs for DPI versus how much is done by the system.

Functions

 
AdjustWindowRectExForDpi

Calculates the required size of the window rectangle, based on the desired size of the client rectangle and the provided DPI.
AreDpiAwarenessContextsEqual

Determines whether two DPI_AWARENESS_CONTEXT values are identical.
EnableNonClientDpiScaling

In high-DPI displays, enables automatic display scaling of the non-client area portions of the specified top-level window. Must be called during the initialization of that window.
GetAwarenessFromDpiAwarenessContext

Retrieves the DPI_AWARENESS value from a DPI_AWARENESS_CONTEXT.
GetDialogControlDpiChangeBehavior

Retrieves and per-monitor DPI scaling behavior overrides of a child window in a dialog.
GetDialogDpiChangeBehavior

Returns the flags that might have been set on a given dialog by an earlier call to SetDialogDpiChangeBehavior.
GetDpiAwarenessContextForProcess

Gets a DPI_AWARENESS_CONTEXT handle for the specified process.
GetDpiForMonitor

Queries the dots per inch (dpi) of a display.
GetDpiForSystem

Returns the system DPI.
GetDpiForWindow

Returns the dots per inch (dpi) value for the specified window.
GetDpiFromDpiAwarenessContext

Retrieves the DPI from a given DPI_AWARENESS_CONTEXT handle. This enables you to determine the DPI of a thread without needed to examine a window created within that thread.
GetProcessDpiAwareness

Retrieves the dots per inch (dpi) awareness of the specified process.
GetSystemDpiForProcess

Retrieves the system DPI associated with a given process. This is useful for avoiding compatibility issues that arise from sharing DPI-sensitive information between multiple system-aware processes with different system DPI values.
GetSystemMetricsForDpi

Retrieves the specified system metric or system configuration setting taking into account a provided DPI.
GetThreadDpiAwarenessContext

Gets the DPI_AWARENESS_CONTEXT for the current thread.
GetThreadDpiHostingBehavior

Retrieves the DPI_HOSTING_BEHAVIOR from the current thread.
GetWindowDpiAwarenessContext

Returns the DPI_AWARENESS_CONTEXT associated with a window.
GetWindowDpiHostingBehavior

Returns the DPI_HOSTING_BEHAVIOR of the specified window.
InheritWindowMonitor

Causes a specified window to inherit the monitor of another window.
IsValidDpiAwarenessContext

Determines if a specified DPI_AWARENESS_CONTEXT is valid and supported by the current system.
LogicalToPhysicalPointForPerMonitorDPI

Converts a point in a window from logical coordinates into physical coordinates, regardless of the dots per inch (dpi) awareness of the caller.
OpenThemeDataForDpi

A variant of OpenThemeData that opens a theme handle associated with a specific DPI.
PhysicalToLogicalPointForPerMonitorDPI

Converts a point in a window from physical coordinates into logical coordinates, regardless of the dots per inch (dpi) awareness of the caller.
SetDialogControlDpiChangeBehavior

Overrides the default per-monitor DPI scaling behavior of a child window in a dialog.
SetDialogDpiChangeBehavior

Dialogs in Per-Monitor v2 contexts are automatically DPI scaled. This method lets you customize their DPI change behavior.
SetProcessDpiAwareness

Sets the process-default DPI awareness level. This is equivalent to calling SetProcessDpiAwarenessContext with the corresponding DPI_AWARENESS_CONTEXT value.
SetProcessDpiAwarenessContext

Sets the current process to a specified dots per inch (dpi) awareness context. The DPI awareness contexts are from the DPI_AWARENESS_CONTEXT value.
SetThreadCursorCreationScaling

Sets the DPI scale for which the cursors being created on this thread are intended. This value is taken into account when scaling the cursor for the specific monitor on which it is being shown.
SetThreadDpiAwarenessContext

Set the DPI awareness for the current thread to the provided value.
SetThreadDpiHostingBehavior

Sets the thread's DPI_HOSTING_BEHAVIOR. This behavior allows windows created in the thread to host child windows with a different DPI_AWARENESS_CONTEXT.
SystemParametersInfoForDpi

Retrieves the value of one of the system-wide parameters, taking into account the provided DPI value.