High DPI Reference
Functions
Topic | Description |
---|---|
AdjustWindowRectExForDpi | A variant of AdjustWindowRectEx that returns values scaled to a specific DPI. |
AreDpiAwarenessContextsEqual | Determines whether two DPI_AWARENESS_CONTEXT values are equivalent. |
EnableNonClientDpiScaling | Enables automatic scaling of the non-client area of the specified top-level window. |
GetAwarenessFromDpiAwarenessContext | Retrieves the DPI_AWARENESS value from a DPI_AWARENESS_CONTEXT |
GetDpiForMonitor | Queries the DPI information associated with a monitor. |
GetDpiForSystem | Returns the system DPI. |
GetDpiForWindow | Returns the current DPI for the specified window. |
GetProcessDpiAwareness | Retrieves the DPI virtualization mode of the specified process. |
GetSystemMetricsForDpi | A variant of GetSystemMetrics that returns values scaled to a specific DPI. |
GetThreadDpiAwarenessContext | Retrieves the active DPI awareness context for the current thread. |
GetWindowDpiAwarenessContext | Retrieves the DPI awareness context for a window. |
IsValidDpiAwarenessContext | Determines if a 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 DPI awareness of the caller. |
PhysicalToLogicalPointForPerMonitorDPI | Converts a point in a window from physical coordinates into logical coordinates, regardless of the DPI awareness of the caller. |
SetProcessDpiAwareness | Sets the DPI virtualization mode for the current process. |
SetThreadDpiAwarenessContext | Changes the active DPI awareness context for the current thread. |
SystemParametersInfoForDpi | A variant of SystemParametersInfo that returns values scaled to a specific DPI. |
SetProcessDpiAwarenessContext | Sets the DPI awareness context for the current process. |
SetDialogDpiChangeBehavior | Overrides the default per-monitor DPI scaling behavior of a dialog. |
GetDialogDpiChangeBehavior | Retrieves the per-monitor DPI scaling behavior of a dialog. |
SetDialogControlDpiChangeBehavior | Overrides the default per-monitor DPI scaling behavior of a child window in a dialog. |
GetDialogControlDpiChangeBehavior | Retrieves any per-monitor DPI scaling behavior overrides of a child window in a dialog. |
OpenThemeDataForDpi | A variant of OpenThemeData that opens theme handles associated with a specific DPI. |
GetSystemDpiForProcess | Retrieves the system DPI associated with a given process. |
GetDpiFromDpiAwarenessContext | Retrieves the DPI from a given DPI_AWARENESS_CONTEXT handle. |
SetThreadDpiHostingBehavior | Overrides the default DPI hosting behavior of the current thread. |
GetThreadDpiHostingBehavior | Retrieves the DPI hosting behavior of the current thread. |
GetWindowDpiHostingBehavior | Retrieves the DPI hosting behavior of the specified window. |
Types
Topic | Description |
---|---|
DPI_AWARENESS | Represents DPI coordinate virtualization modes. |
DPI_AWARENESS_CONTEXT | A token which represents a DPI virtualization mode and associated behaviors. |
DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS | Describes per-monitor DPI scaling behavior overrides for child windows within dialogs. |
DIALOG_DPI_CHANGE_BEHAVIORS | Describes per-monitor DPI scaling behavior overrides for dialogs. |
MONITOR_DPI_TYPE | Represents the type of DPI associated with a monitor. |
PROCESS_DPI_AWARENESS | Represents the DPI coordinate virtualization mode of a process. |
DPI_HOSTING_BEHAVIOR | Represents the DPI hosting behavior for a window. |
Messages
Topic | Description |
---|---|
WM_DPICHANGED | Notifies a top-level window that its DPI has changed. |
WM_DPICHANGED_BEFOREPARENT | Notifies a child window that the DPI associated with its containing window has changed. Delivered before the parent window is notified. |
WM_DPICHANGED_AFTERPARENT | Notifies a child window that the DPI associated with its containing window has changed. Delivered after the parent window is notified. |
WM_GETDPISCALEDSIZE | Allows top-level windows to resize non-linearly in response to DPI changes. |