Skip to main content

TdxProcessDpiAwareness Enum

Enumerates process DPI awareness modes.

Declaration

TdxProcessDpiAwareness = (
    pdaUnaware,
    pdaSystemDpiAware,
    pdaPerMonitorDpiAware,
    pdaPerMonitorDpiAwareV2,
    pdaUnawareGdiScaled
);

Members

Name Description Manifest Element
pdaUnaware

Not recommended. The application is DPI-unaware; the scale factor of all forms is always 100% and corresponds to 96 DPI.

Mode Availability
The DPI-unaware mode is available in all operating systems.

unaware

pdaSystemDpiAware

Unrecommended. The application scales its visual elements only at startup according to the system DPI and does not respond to consequent DPI changes. The host operating system automatically scales such applications when a window moves between monitors with different DPIs.

System DPI Aware is a compatibility DPI awareness mode for older operating systems. We do not recommend that you use this mode for applications targeting Microsoft Windows® 8.1 and newer operating systems because operating system-dependent scaling algorithms can make UI elements blurry.

Mode Availability
The System DPI Awareness mode is available in all operating systems since Microsoft Windows® XP.

system

pdaPerMonitorDpiAware

The Per-Monitor DPI Awareness (v1) mode allows the application to scale its visual elements dynamically in response to WM_DPICHANGED system messages it receives every time the current monitor DPI changes or an application window moves between monitors with different DPI values.

Tip

We recommend that you use the Per-Monitor DPI Awareness (v2) mode for applications that target Microsoft Windows® 10 (since build 1607) and newer operating systems.

Mode Availability
The Per-Monitor DPI Awareness (v1) mode is available in Microsoft Windows® 8.1 and newer operating systems.

PerMonitor

pdaPerMonitorDpiAwareV2

Recommended. The Per-Monitor DPI Awareness (v2) mode allows the application to scale its visual elements dynamically in response to WM_DPICHANGED system messages it receives every time the current monitor DPI changes or an application window moves between monitors with different DPI values.

In addition, the host operating system also automatically scales non-client window areas (such as the caption bar, scrollbars, etc.), system dialogs, and Native Theme-drawn controls. The operating system also loads multiple sets of icons and other bitmap assets targeting different DPIs for all Native Theme-drawn UI elements.

Mode Availability
The Per-Monitor DPI Awareness (v2) mode is available in Microsoft Windows® 10 (since build 1703) and newer operating systems.

PerMonitorV2

pdaUnawareGdiScaled

Not recommended. The application is unaware of system DPI changes but the host operating system automatically scales text and GDI-based primitives according to the current monitor DPI.

Important

GDI Scaled is a compatibility mode designed for scenarios when other GDI awareness modes are unavailable for any reason. We do not recommend that you use GDI Scaled mode for any project that includes DevExpress components because this mode conflicts with our scaling implementation.

The GDI Scaled DPI awareness mode also makes the DirectX render mode unavailable for all supported controls because all DirectX-rendered controls are drawn unscaled at their original (unscaled) positions.

Mode Availability
The GDI Scaled mode is available since the October 2018 Windows® 10 update (build 1809).

gdiScaling

Remarks

The active DPI awareness mode is specified in IDE project settings at the manifest application level.

Direct TdxProcessDpiAwareness Type References

The following public API members reference the TdxProcessDpiAwareness type:

dxGetProcessDpiAwareness
Identifies the DPI awareness mode of the current or specified process.
dxGetProcessDpiAwareness(THandle)
dxGetProcessDpiAwareness(THandle,TdxProcessDpiAwareness)
dxSetProcessDpiAwareness(TdxProcessDpiAwareness)
Enables the specified DPI awareness mode for the current process.
See Also