2.2.2.2.1 DISPLAYCONTROL_MONITOR_LAYOUT

The DISPLAYCONTROL_MONITOR_LAYOUT structure is used to specify the characteristics of a monitor. The coordinates used to describe the monitor position MUST be relative to the upper-left corner of the monitor designated as the "primary display monitor". The upper-left corner of the primary monitor is always (0, 0).


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Flags

Left

Top

Width

Height

PhysicalWidth

PhysicalHeight

Orientation

DesktopScaleFactor

DeviceScaleFactor

Flags (4 bytes): A 32-bit unsigned integer that specifies monitor configuration flags.

Flag

Meaning

DISPLAYCONTROL_MONITOR_PRIMARY

0x00000001

The monitor specified by this structure is the primary monitor.

Left (4 bytes): A 32-bit signed integer that specifies the x-coordinate of the upper-left corner of the display monitor.

Top (4 bytes): A 32-bit signed integer that specifies the y-coordinate of the upper-left corner of the display monitor.

Width (4 bytes): A 32-bit unsigned integer that specifies the width of the monitor in pixels. The width MUST be greater than or equal to 200 pixels and less than or equal to 8192 pixels, and MUST NOT be an odd value.

Height (4 bytes): A 32-bit unsigned integer that specifies the height of the monitor in pixels. The height MUST be greater than or equal to 200 pixels and less than or equal to 8192 pixels.

PhysicalWidth (4 bytes): A 32-bit unsigned integer that specifies the physical width of the monitor, in millimeters (mm). This value MUST be ignored if it is less than 10 mm or greater than 10,000 mm or the PhysicalHeight field is less than 10 mm or greater than 10,000 mm.

PhysicalHeight (4 bytes): A 32-bit unsigned integer that specifies the physical height of the monitor, in millimeters. This value MUST be ignored if it is less than 10 mm or greater than 10,000 mm or PhysicalWidth is less than 10 mm or greater than 10,000 mm.

Orientation (4 bytes): A 32-bit unsigned integer that specifies the orientation of the monitor in degrees. Valid values are 0, 90, 180 or 270. This value MUST be ignored if it is not set to one of these values.

Value

Meaning

ORIENTATION_LANDSCAPE

0

The desktop is not rotated.

ORIENTATION_PORTRAIT

90

The desktop is rotated clockwise by 90 degrees.

ORIENTATION_LANDSCAPE_FLIPPED

180

The desktop is rotated clockwise by 180 degrees.

ORIENTATION_PORTRAIT_FLIPPED

270

The desktop is rotated clockwise by 270 degrees.

DesktopScaleFactor (4 bytes): A 32-bit, unsigned integer that specifies the desktop scale factor of the monitor. This value MUST be ignored if it is less than 100 percent or greater than 500 percent, or if DeviceScaleFactor is not 100 percent, 140 percent, or 180 percent.

DeviceScaleFactor (4 bytes): A 32-bit, unsigned integer that specifies the device scale factor of the monitor. This value MUST be ignored if it is not set to 100 percent, 140 percent, or 180 percent or if DesktopScaleFactor is less than 100 percent or greater than 500 percent.<1>