_DISPLAY_DEVICEA structure

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

Syntax

typedef struct _DISPLAY_DEVICEA {
  DWORD cb;
  CHAR  DeviceName[32];
  CHAR  DeviceString[128];
  DWORD StateFlags;
  CHAR  DeviceID[128];
  CHAR  DeviceKey[128];
} DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA;

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.

Value Meaning
DISPLAY_DEVICE_ACTIVE DISPLAY_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_DRIVER Represents 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_MODESPRUNED The device has more display modes than its output devices support.
DISPLAY_DEVICE_PRIMARY_DEVICE The 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_REMOVABLE The device is removable; it cannot be the primary display.
DISPLAY_DEVICE_VGA_COMPATIBLE The 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)

See Also

Device Context Structures

Device Contexts Overview

EnumDisplayDevices

GetSystemMetrics