Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DISPLAY_DEVICE structure

The DISPLAY_DEVICE structure receives information about the display device specified by the iDevNum parameter of the EnumDisplayDevices function.

Syntax


typedef struct _DISPLAY_DEVICE {
  DWORD cb;
  TCHAR DeviceName[32];
  TCHAR DeviceString[128];
  DWORD StateFlags;
  TCHAR DeviceID[128];
  TCHAR DeviceKey[128];
} DISPLAY_DEVICE, *PDISPLAY_DEVICE;

Members

cb

Size, in bytes, of the DISPLAY_DEVICE structure. This must be initialized prior to calling EnumDisplayDevices.

DeviceName

An array of characters identifying the device name. This is either the adapter device or the monitor device.

DeviceString

An array of characters containing the device context string. This is either a description of the display adapter or of the display monitor.

StateFlags

Device state flags. It can be any reasonable combination of the following.

ValueMeaning
DISPLAY_DEVICE_ACTIVEDISPLAY_DEVICE_ACTIVE specifies whether a monitor is presented as being "on" by the respective GDI view.

Windows Vista: EnumDisplayDevices will only enumerate monitors that can be presented as being "on."

DISPLAY_DEVICE_MIRRORING_DRIVERRepresents a pseudo device used to mirror application drawing for remoting or other purposes. An invisible pseudo monitor is associated with this device. For example, NetMeeting uses it. Note that GetSystemMetrics (SM_MONITORS) only accounts for visible display monitors.
DISPLAY_DEVICE_MODESPRUNEDThe device has more display modes than its output devices support.
DISPLAY_DEVICE_PRIMARY_DEVICEThe primary desktop is on the device. For a system with a single display card, this is always set. For a system with multiple display cards, only one device can have this set.
DISPLAY_DEVICE_REMOVABLEThe device is removable; it cannot be the primary display.
DISPLAY_DEVICE_VGA_COMPATIBLEThe device is VGA compatible.

 

DeviceID

Not used.

DeviceKey

Reserved.

Remarks

The four string members are set based on the parameters passed to EnumDisplayDevices. If the lpDevice param is NULL, then DISPLAY_DEVICE is filled in with information about the display adapter(s). If it is a valid device name, then it is filled in with information about the monitor(s) for that device.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Unicode and ANSI names

DISPLAY_DEVICEW (Unicode) and DISPLAY_DEVICEA (ANSI)

See also

Device Contexts Overview
Device Context Structures
EnumDisplayDevices
GetSystemMetrics

 

 

Community Additions

Show:
© 2014 Microsoft