DISPLAY_DEVICE structure
Applies to: desktop apps only
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.
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 |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Unicode and ANSI names | DISPLAY_DEVICEW (Unicode) and DISPLAY_DEVICEA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012
- 6/14/2010
- ArnoudMulder
- 11/3/2011
- verdy.p
- 10/18/2009
- Niels M Hansen
- 8/2/2009
- Jakub Nietrzeba