DISPLAY_DEVICE结构

DISPLAY_DEVICE
The DISPLAY_DEVICE structure receives information about the displaydevice specified by the iDevNum parameter of the EnumDisplayDevicesfunction.
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 beinitialized prior to calling EnumDisplayDevices.
DeviceName
An array of characters identifying the device name. This is eitherthe adapter device or the monitor device.
DeviceString
An array of characters containing the device context string. Thisis either a description of the display adapter or of the displaymonitor.
StateFlags
Device state flags. It can be any reasonable combination of thefollowing. Value Meaning
DISPLAY_DEVICE_ATTACHED_TO_DESKTOP The device is part of thedesktop.
DISPLAY_DEVICE_MIRRORING_DRIVER Represents a pseudo device used tomirror application drawing for remoting or other purposes. Aninvisible pseudo monitor is associated with this device. Forexample, NetMeeting uses it. Note thatGetSystemMetrics(SM_MONITORS) only accounts for visible displaymonitors.
DISPLAY_DEVICE_MODESPRUNED The device has more display modes thanits 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 asystem with multiple display cards, only one device can have thisset.
DISPLAY_DEVICE_REMOVABLE The device is removable; it cannot be theprimary display.
DISPLAY_DEVICE_VGA_COMPATIBLE The device is VGA compatible.

DeviceID
Windows 98/Me: A string that uniquely identifies the hardwareadapter or the monitor. This is the Plug and Play identifier.
DeviceKey
Reserved.
Remarks
The four string members are set based on the parameters passed toEnumDisplayDevices. If the lpDevice param is NULL, thenDISPLAY_DEVICE is filled in with information about the displayadapter(s). If it is a valid device name, then it is filled in withinformation about the monitor(s) for that device.

你可能感兴趣的:(windows)