网站首页  词典首页

请输入您要查询的函数:

 

术语 enumdisplaysettings
释义 EnumDisplaySettings
语法:
BOOL EnumDisplaySettings(
__in LPCTSTR lpszDeviceName,
__in DWORD iModeNum,
__out DEVMODE *lpDevMode
);
EnumDisplaySettings函数
该EnumDisplaySettings函数检索信息的显示设备的图形模式之一。要检索的所有显示设备的图形模式的信息,作出了这个函数调用系列。
参数
lpszDeviceName [in]
一个指向 null 结尾的字符串指针,指定谁的图形模式函数将获取的信息显示装置。
此参数是NULL或者一个DISPLAY_DEVICE。DeviceName的从EnumDisplayDevices返回。 NULL值指定的计算机上调用线程的运行当前的显示设备。
iModeNum [in]
该类型的信息进行检索。此值可以是图形模式索引或下列值之一。
ValueMeaning
ENUM_CURRENT_SETTINGSRetrieve用于显示设备的当前设置。
ENUM_REGISTRY_SETTINGSRetrieve设置的显示设备目前在注册表中。
图形模式索引从零开始。要获得一个显示设备的图形模式的所有资料,制作一系列的EnumDisplaySettings要求,如下:设置iModeNum为零第一次调用,以及其后每通话一价iModeNum。继续呼吁,直到该函数的返回值是零。
当您调用设置为零iModeNum EnumDisplaySettings,操作系统初始化和缓存有关资料显示设备。当您调用设置为一个非零值iModeNum EnumDisplaySettings,函数返回被缓存的最后一次与iModeNum功能一套名为为零的信息。
lpDevMode [out]
一个DEVMODE结构的指针到其中的存储信息的功能指定图形模式。在调用EnumDisplaySettings,设置dmSize成员为sizeof(DEVMODE的),并设置dmDriverExtra成员显示大小,以字节的额外空间可用于接收数据的私人司机。
该EnumDisplaySettings函数设置为以下五个的DEVMODE成员的值:
dmBitsPerPel
dmPelsWidth
dmPelsHeight
dmDisplayFlags
dmDisplayFrequency
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。
备注
函数失败如果iModeNum大于显示设备的模式上的图形索引。作为在iModeNum参数的说明指出,您可以使用此行为枚举显示设备的图形模式的。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinuser.h(头文件:winuser.h)
LibraryUser32.lib
DLLUser32.dll
Unicode和ANSI namesEnumDisplaySettingsW(Unicode)和EnumDisplaySettingsA(ANSI)的
参见
设备上下文概述
设备上下文函数
ChangeDisplaySettings
ChangeDisplaySettingsEx
CreateDC
CreateDesktop
的DEVMODE
DISPLAY_DEVICE
EnumDisplayDevices
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==EnumDisplaySettings Function
The EnumDisplaySettings function retrieves information about one of the graphics modes for a display device. To retrieve information for all the graphics modes of a display device, make a series of calls to this function.
Syntax
BOOL EnumDisplaySettings(
__in LPCTSTR lpszDeviceName,
__in DWORD iModeNum,
__out DEVMODE *lpDevMode
);
Parameters
lpszDeviceName [in]
A pointer to a null-terminated string that specifies the display device about whose graphics mode the function will obtain information.
This parameter is either NULL or a DISPLAY_DEVICE .DeviceName returned from EnumDisplayDevices . A NULL value specifies the current display device on the computer on which the calling thread is running.
iModeNum [in]
The type of information to be retrieved. This value can be a graphics mode index or one of the following values.
ValueMeaning
ENUM_CURRENT_SETTINGSRetrieve the current settings for the display device.
ENUM_REGISTRY_SETTINGSRetrieve the settings for the display device that are currently stored in the registry.

Graphics mode indexes start at zero. To obtain information for all of a display device's graphics modes, make a series of calls to EnumDisplaySettings, as follows: Set iModeNum to zero for the first call, and increment iModeNum by one for each subsequent call. Continue calling the function until the return value is zero.
When you call EnumDisplaySettings with iModeNum set to zero, the operating system initializes and caches information about the display device. When you call EnumDisplaySettings with iModeNum set to a non-zero value, the function returns the information that was cached the last time the function was called with iModeNum set to zero.
lpDevMode [out]
A pointer to a DEVMODE structure into which the function stores information about the specified graphics mode. Before calling EnumDisplaySettings, set the dmSize member to sizeof(DEVMODE), and set the dmDriverExtra member to indicate the size, in bytes, of the additional space available to receive private driver data.
The EnumDisplaySettings function sets values for the following five DEVMODE members:
dmBitsPerPel
dmPelsWidth
dmPelsHeight
dmDisplayFlags
dmDisplayFrequency
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
Remarks
The function fails if iModeNum is greater than the index of the display device's last graphics mode. As noted in the description of the iModeNum parameter, you can use this behavior to enumerate all of a display device's graphics modes.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinuser.h (include Windows.h)
LibraryUser32.lib
DLLUser32.dll
Unicode and ANSI namesEnumDisplaySettingsW (Unicode) and EnumDisplaySettingsA (ANSI)
See Also
Device Contexts Overview
Device Context Functions
ChangeDisplaySettings
ChangeDisplaySettingsEx
CreateDC
CreateDesktop
DEVMODE
DISPLAY_DEVICE
EnumDisplayDevices
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162611(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 13:15:29