网站首页  词典首页

请输入您要查询的函数:

 

术语 findwindowex
释义 FindWindowEx
语法:
HWND FindWindowEx( HWND hwndParent,
HWND hwndChildAfter,
LPCTSTR lpszClass,
LPCTSTR lpszWindow
);
FindWindowEx函数
该FindWindowEx函数检索的句柄窗口的类名和窗口的名称匹配指定的字符串。函数子窗口搜索,以下同一个指定的子窗口开始。此函数不执行区分大小写的搜索。
参数
hwndParent
[in]句柄父窗口的子窗口进行搜索。
如果hwndParent为NULL,则函数使用作为桌面窗口的父窗口。窗口之间属于子窗口的桌面搜索功能。
微软Windows 2000和Windows XP:如果hwndParent是HWND_MESSAGE,功能搜索所有信息,只有Windows。
hwndChildAfter
[in]句柄子窗口。搜寻始于与Z顺序中的下一个子窗口。子窗口必须是hwndParent直接子窗口,而不仅仅是一个后裔窗口。
如果hwndChildAfter为NULL,则开始搜索同hwndParent第一个子窗口。
注意,如果同时hwndParent和hwndChildAfter是NULL,函数搜索所有顶级的消息,只有Windows。
lpszClass
[in]
指向一个以NULL结尾的字符串,指定类名或一类原子因先前调用RegisterClass的或RegisterClassEx函数创建。原子必须被放置在低lpszClass命令字;的高位字必须为零。
如果lpszClass是一个字符串,它指定窗口的类名。类名可以用注册窗口或RegisterClassEx,或事先确定的控制任何名义,任何注册类名,也可以是MAKEINTATOM(0x800)。在后一种情况下,0x8000是一个菜单类原子。有关更多信息,请参阅本主题的备注部分。
lpszWindow
[in]指向一个空结束的字符串,指定窗口名(窗口标题)。如果该参数为NULL,所有窗口的名称匹配。
返回值
如果函数成功,返回值是一个窗口句柄具有指定类和窗口名。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
如果lpszWindow参数不是NULL,FindWindowEx调用GetWindowText函数来检索比较窗口的名称。对于一个潜在的问题可能会出现说明,看到GetWindowText备注部分。
应用程序可以调用以下方式这一功能。
FindWindowEx(空,空,MAKEINTATOM(0x8000),空);
0x8000是一个菜单类原子。当应用程序调用该函数,该函数检查是否上下文菜单正在显示该应用程序创建的。
Windows 95或更高版本:FindWindowExW由对于Unicode(MSLU)微软层的支持。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 4.0
UnicodeImplemented为ANSI和Unicode版本。
参见
视窗概述,EnumWindows,FindWindow,GetClassName,GetWindowText,RegisterClass的,RegisterClassEx
==英文原文==FindWindowEx Function
The FindWindowEx function retrieves a handle to a window whose class name and window name match the specified strings. The function searches child windows, beginning with the one following the specified child window. This function does not perform a case-sensitive search.
Syntax
HWND FindWindowEx( HWND hwndParent,
HWND hwndChildAfter,
LPCTSTR lpszClass,
LPCTSTR lpszWindow
);
Parameters
hwndParent
[in] Handle to the parent window whose child windows are to be searched.
If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop.
Microsoft Windows 2000 and Windows XP: If hwndParent is HWND_MESSAGE, the function searches all message-only windows .
hwndChildAfter
[in] Handle to a child window. The search begins with the next child window in the Z order. The child window must be a direct child window of hwndParent, not just a descendant window.
If hwndChildAfter is NULL, the search begins with the first child window of hwndParent.
Note that if both hwndParent and hwndChildAfter are NULL, the function searches all top-level and message-only windows.
lpszClass
[in]
Pointer to a null-terminated string that specifies the class name or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be placed in the low-order word of lpszClass; the high-order word must be zero.
If lpszClass is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, or any of the predefined control-class names, or it can be MAKEINTATOM (0x800). In this latter case, 0x8000 is the atom for a menu class. For more information, see the Remarks section of this topic.
lpszWindow
[in] Pointer to a null-terminated string that specifies the window name (the window's title). If this parameter is NULL, all window names match.
Return Value
If the function succeeds, the return value is a handle to the window that has the specified class and window names.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
If the lpszWindow parameter is not NULL, FindWindowEx calls the GetWindowText function to retrieve the window name for comparison. For a description of a potential problem that can arise, see the Remarks section of GetWindowText.
An application can call this function in the following way.
FindWindowEx( NULL, NULL, MAKEINTATOM(0x8000), NULL );
0x8000 is the atom for a menu class. When an application calls this function, the function checks whether a context menu is being displayed that the application created.
Windows 95 or later: FindWindowExW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 4.0
UnicodeImplemented as ANSI and Unicode versions.
See Also
Windows Overview , EnumWindows , FindWindow , GetClassName , GetWindowText , RegisterClass , RegisterClassEx
==原始网址==http://msdn.microsoft.com/en-us/library/ms633500(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:23:08