Επεξεργασία

Κοινή χρήση μέσω


HighDpiMode Enum

Definition

Specifies the different high DPI modes that can be applied to an application.

public enum class HighDpiMode
public enum HighDpiMode
type HighDpiMode = 
Public Enum HighDpiMode
Inheritance
HighDpiMode

Fields

Name Value Description
DpiUnaware 0

The application window does not scale for DPI changes and always assumes a scale factor of 100%.

SystemAware 1

The window queries for the DPI of the primary monitor once and uses this for the application on all monitors.

PerMonitor 2

The window checks for DPI when it's created and adjusts scale factor when the DPI changes.

PerMonitorV2 3

Similar to PerMonitor, but enables child window DPI change notification, improved scaling of comctl32 controls, and dialog scaling.

DpiUnawareGdiScaled 4

Similar to DpiUnaware, but improves the quality of GDI/GDI+ based content.

Remarks

Specifying the high DPI mode is dependent on the OS version of the machine you're running your application on. Setting the high DPI mode will work on machines running Windows 10 Creators Update (version 1703) or later versions.

Changing the DPI mode after the application has started running doesn't impact scaling (that is, the change won't take effect).

If you're using the PerMonitor value and there is more than one monitor attached with different DPI settings, the DPI may change when the window is moved from one monitor to the other. In this case, the application rescales according to the new monitor's DPI settings. Alternatively, the DPI of a window can be changed when the OS scaling setting is changed for the monitor the window is on.

Applies to