网站首页  词典首页

请输入您要查询的函数:

 

术语 enumdisplaydevices
释义 EnumDisplayDevices
语法:
BOOL EnumDisplayDevices(
__in LPCTSTR lpDevice,
__in DWORD iDevNum,
__out PDISPLAY_DEVICE lpDisplayDevice,
__in DWORD dwFlags
);
EnumDisplayDevices功能
该EnumDisplayDevices功能让您获取有关在本届会议上的显示设备的信息。
参数
lpDevice [in]
阿以设备名指针。如果为NULL,函数返回的信息显示适配器(s)的机器iDevNum基础。
有关更多信息,请参见备注。
iDevNum [in]
索引值,指定显示设备的兴趣。
该操作系统确定了本届会议的每一个索引值显示设备。该指数值是连续的整数,从0开始。如果本届会议有三个显示设备,例如,他们指定的索引值0,1和2。
lpDisplayDevice [out]
一个 DISPLAY_DEVICE结构所iDevNum收到指定的显示设备信息的指针。
在调用EnumDisplayDevices,您必须初始化DISPLAY_DEVICE会CB成员的大小,以字节为DISPLAY_DEVICE。
dwFlags [in]
设置此标志EDD_GET_DEVICE_INTERFACE_NAME(0x00000001)以检索GUID_DEVINTERFACE_MONITOR,是由在每个监控的基础操作系统注册设备接口名。该值在DISPLAY_DEVICE结构的DeviceID成员放置返回lpDisplayDevice。由此产生的设备接口的名称可以使用SetupAPI函数和之间的一个GDI的监控设备和监控设备SetupAPI的桥梁。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。函数失败如果iDevNum大于最大的器件索引。
备注
要查询在本届会议上的所有显示设备,在循环中调用此功能,设置为0 iDevNum开始,直到iDevNum递增函数失败。要选择在桌面的所有显示设备,只使用的显示设备已经在DISPLAY_DEVICE结构DISPLAY_DEVICE_ATTACHED_TO_DESKTOP标志。
为了获得显示适配器信息,请与lpDevice设置为NULL EnumDisplayDevices。例如,DISPLAY_DEVICE.DeviceString包含适配器的名称。
要获取显示屏上的信息,首先调用lpDevice设置为NULL EnumDisplayDevices。然后调用设置为DISPLAY_DEVICE.DeviceName从第一次调用EnumDisplayDevices和设置为零iDevNum lpDevice EnumDisplayDevices。然后DISPLAY_DEVICE.DeviceString是显示器的名称。
查询所有监测适配器相关设备,调用与设置适配器名称lpDevice,iDevNum循环EnumDisplayDevices设置为从0开始,并设置为增量iDevNum直到函数失败。请注意,每个监测信息,请调用DISPLAY_DEVICE.DeviceName变化,所以您必须保存适配器的名称。函数失败时,请适配器没有更多显示器。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
Unicode和ANSI namesEnumDisplayDevicesW(Unicode)和EnumDisplayDevicesA(ANSI)的
参见
设备上下文概述
设备上下文函数
ChangeDisplaySettings
ChangeDisplaySettingsEx
CreateDC
的DEVMODE
DISPLAY_DEVICE
EnumDisplaySettings
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==EnumDisplayDevices Function
The EnumDisplayDevices function lets you obtain information about the display devices in the current session.
Syntax
BOOL EnumDisplayDevices(
__in LPCTSTR lpDevice,
__in DWORD iDevNum,
__out PDISPLAY_DEVICE lpDisplayDevice,
__in DWORD dwFlags
);
Parameters
lpDevice [in]
A pointer to the device name. If NULL, function returns information for the display adapter(s) on the machine, based on iDevNum.
For more information, see Remarks.
iDevNum [in]
An index value that specifies the display device of interest.
The operating system identifies each display device in the current session with an index value. The index values are consecutive integers, starting at 0. If the current session has three display devices, for example, they are specified by the index values 0, 1, and 2.
lpDisplayDevice [out]
A pointer to a DISPLAY_DEVICE structure that receives information about the display device specified by iDevNum.
Before calling EnumDisplayDevices, you must initialize the cb member of DISPLAY_DEVICE to the size, in bytes, of DISPLAY_DEVICE.
dwFlags [in]
Set this flag to EDD_GET_DEVICE_INTERFACE_NAME (0x00000001) to retrieve the device interface name for GUID_DEVINTERFACE_MONITOR, which is registered by the operating system on a per monitor basis. The value is placed in the DeviceID member of the DISPLAY_DEVICE structure returned in lpDisplayDevice. The resulting device interface name can be used with SetupAPI functions and serves as a link between GDI monitor devices and SetupAPI monitor devices.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. The function fails if iDevNum is greater than the largest device index.
Remarks
To query all display devices in the current session, call this function in a loop, starting with iDevNum set to 0, and incrementing iDevNum until the function fails. To select all display devices in the desktop, use only the display devices that have the DISPLAY_DEVICE_ATTACHED_TO_DESKTOP flag in the DISPLAY_DEVICE structure.
To get information on the display adapter, call EnumDisplayDevices with lpDevice set to NULL. For example, DISPLAY_DEVICE.DeviceString contains the adapter name.
To obtain information on a display monitor, first call EnumDisplayDevices with lpDevice set to NULL. Then call EnumDisplayDevices with lpDevice set to DISPLAY_DEVICE.DeviceName from the first call to EnumDisplayDevices and with iDevNum set to zero. Then DISPLAY_DEVICE.DeviceString is the monitor name.
To query all monitor devices associated with an adapter, call EnumDisplayDevices in a loop with lpDevice set to the adapter name, iDevNum set to start at 0, and iDevNum set to increment until the function fails. Note that DISPLAY_DEVICE.DeviceName changes with each call for monitor information, so you must save the adapter name. The function fails when there are no more monitors for the adapter.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
Unicode and ANSI namesEnumDisplayDevicesW (Unicode) and EnumDisplayDevicesA (ANSI)
See Also
Device Contexts Overview
Device Context Functions
ChangeDisplaySettings
ChangeDisplaySettingsEx
CreateDC
DEVMODE
DISPLAY_DEVICE
EnumDisplaySettings
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162609(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:30:39