网站首页  词典首页

请输入您要查询的函数:

 

术语 enumwindows
释义 EnumWindows
语法:
BOOL EnumWindows( WNDENUMPROC lpEnumFunc,
LPARAM lParam
);
EnumWindows函数
EnumWindows函数枚举的句柄传递到每个窗口反过来,所有顶级Level,在屏幕上的窗口,一个应用程序定义的回调函数。 EnumWindows继续进行,直到最后一个顶层窗口枚举或回调函数返回FALSE。
参数
lpEnumFunc
[in]指向一个应用程序定义的回调函数。有关更多信息,请参阅EnumWindowsProc。
lparam的
[in]指定一个应用程序定义的值传递给回调函数。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
如果EnumWindowsProc返回零,则返回值也为零。在这种情况下,回调函数应该调用SetLastError,取得有意义的错误代码返回给调用者的EnumWindows。
备注
EnumWindows函数不枚举子窗口,随着一些高层异常的系统所拥有具有WS_CHILD样式Level的窗口。
此功能更可靠比调用在循环中GetWindow功能。一个应用程序调用GetWindow来执行这项任务有可能被一个无限循环或引用捕获句柄被摧毁的窗口。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
视窗概述,EnumChildWindows,EnumWindowsProc,GetWindow
==英文原文==EnumWindows Function
The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE.
Syntax
BOOL EnumWindows( WNDENUMPROC lpEnumFunc,
LPARAM lParam
);
Parameters
lpEnumFunc
[in] Pointer to an application-defined callback function. For more information, see EnumWindowsProc .
lParam
[in] Specifies an application-defined value to be passed to the callback function.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
If EnumWindowsProc returns zero, the return value is also zero. In this case, the callback function should call SetLastError to obtain a meaningful error code to be returned to the caller of EnumWindows.
Remarks
The EnumWindows function does not enumerate child windows, with the exception of a few top-level windows owned by the system that have the WS_CHILD style.
This function is more reliable than calling the GetWindow function in a loop. An application that calls GetWindow to perform this task risks being caught in an infinite loop or referencing a handle to a window that has been destroyed.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as Unicode version.
See Also
Windows Overview , EnumChildWindows , EnumWindowsProc , GetWindow
==原始网址==http://msdn.microsoft.com/en-us/library/ms633497(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:29:06