网站首页  词典首页

请输入您要查询的函数:

 

术语 getwindow
释义 GetWindow
语法:
HWND GetWindow( HWND hWnd,
UINT uCmd
);
GetWindow函数
该GetWindow函数检索一个窗口句柄具有指定关系(z顺序或业主)到指定的窗口。
参数
hWnd
[in]一个窗口句柄。检索窗口句柄是相对于这个窗口的基础上,对uCmd参数的值。
uCmd
[in]指定之间的指定窗口和窗口的句柄的关系是要检索。此参数可以是下列值之一。
GW_CHILD
检索到标识处理在Z顺序顶部的子窗口,如果指定的窗口是父窗口,否则,检索到句柄为NULL。该函数检查指定窗口的独子窗口。它不检查子窗口。
GW_ENABLEDPOPUP
视窗2000/XP:在检索处理标识启用弹出窗口指定的窗口拥有(搜索使用了第一个这样的窗口中发现使用GW_HWNDNEXT),否则,如果没有启用弹出窗口,检索到的处理是,指定的窗口。
GW_HWNDFIRST
检索到处理标识同一类型窗口中最高的Z顺序。如果指定的窗口是一个最顶层窗口的句柄标识的最顶层窗口是在Z秩序中的最高。如果指定窗口是顶层窗口的句柄标识的顶级窗口是在Z秩序中的最高。如果指定窗口是子窗口的句柄标识兄弟窗口中最高的Z顺序。
GW_HWNDLAST
检索到处理标识同一类型窗口,是在Z顺序的最低Level。如果指定的窗口是一个最顶层窗口的句柄标识的最顶层窗口是在Z顺序的最低Level。如果指定窗口是顶层窗口的句柄标识的顶级窗口是在Z顺序的最低Level。如果指定窗口是子窗口的句柄标识兄弟窗口是在Z顺序的最低Level。
GW_HWNDNEXT
检索到标识处理下面的Z顺序在指定的窗口。如果指定的窗口是一个最顶层窗口的句柄标识指定的窗口下面的最顶层窗口。如果指定窗口是顶层窗口的句柄标识低于指定窗口中的顶级窗口。如果指定窗口是子窗口的句柄标识指定的窗口下面的兄弟窗口。
GW_HWNDPREV
检索到上述处理标识,在Z顺序指定的窗口。如果指定的窗口是一个最顶层窗口的句柄标识指定的窗口上方的最顶层窗口。如果指定窗口是顶层窗口的句柄标识指定的窗口上方的顶层窗口。如果指定窗口是子窗口的句柄标识上述指定窗口兄弟窗口。
GW_OWNER
检索到句柄标识指定的窗口的所有者窗口,如果有的话。有关更多信息,请参阅国有视窗。
返回值
如果函数成功,返回值是一个窗口句柄。如果没有指定的窗口,关系到指定的窗口存在,则返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
该EnumChildWindows功能更可靠比调用在循环GetWindow。一个应用程序调用GetWindow来执行这项任务有可能被一个无限循环或引用捕获句柄被摧毁的窗口。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为Unicode版本。
参见
视窗概述,EnumChildWindows
==英文原文==GetWindow Function
The GetWindow function retrieves a handle to a window that has the specified relationship ( Z-Order or owner) to the specified window.
Syntax
HWND GetWindow( HWND hWnd,
UINT uCmd
);
Parameters
hWnd
[in] Handle to a window. The window handle retrieved is relative to this window, based on the value of the uCmd parameter.
uCmd
[in] Specifies the relationship between the specified window and the window whose handle is to be retrieved. This parameter can be one of the following values.
GW_CHILD
The retrieved handle identifies the child window at the top of the Z order, if the specified window is a parent window; otherwise, the retrieved handle is NULL. The function examines only child windows of the specified window. It does not examine descendant windows.
GW_ENABLEDPOPUP
Windows 2000/XP: The retrieved handle identifies the enabled popup window owned by the specified window (the search uses the first such window found using GW_HWNDNEXT); otherwise, if there are no enabled popup windows, the retrieved handle is that of the specified window.
GW_HWNDFIRST
The retrieved handle identifies the window of the same type that is highest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is highest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is highest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is highest in the Z order.
GW_HWNDLAST
The retrieved handle identifies the window of the same type that is lowest in the Z order. If the specified window is a topmost window, the handle identifies the topmost window that is lowest in the Z order. If the specified window is a top-level window, the handle identifies the top-level window that is lowest in the Z order. If the specified window is a child window, the handle identifies the sibling window that is lowest in the Z order.
GW_HWNDNEXT
The retrieved handle identifies the window below the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window below the specified window. If the specified window is a top-level window, the handle identifies the top-level window below the specified window. If the specified window is a child window, the handle identifies the sibling window below the specified window.
GW_HWNDPREV
The retrieved handle identifies the window above the specified window in the Z order. If the specified window is a topmost window, the handle identifies the topmost window above the specified window. If the specified window is a top-level window, the handle identifies the top-level window above the specified window. If the specified window is a child window, the handle identifies the sibling window above the specified window.
GW_OWNER
The retrieved handle identifies the specified window's owner window, if any. For more information, see Owned Windows .
Return Value
If the function succeeds, the return value is a window handle. If no window exists with the specified relationship to the specified window, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The EnumChildWindows function is more reliable than calling GetWindow 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
==原始网址==http://msdn.microsoft.com/en-us/library/ms633515(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:25:43