![Xcalibur Systems LLC Logo](../icons/logo.png) |
WindowHelperFindWindowEx Method |
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.
FindWindowEx function Namespace: Xcalibur.NativeMethods.V2.WindowsAssembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax[DllImportAttribute("user32.dll")]
public static IntPtr FindWindowEx(
IntPtr parentWindowHandle,
IntPtr nextChildWindowHandle,
string className,
string windowName
)
<DllImportAttribute("user32.dll">]
Public Shared Function FindWindowEx (
parentWindowHandle As IntPtr,
nextChildWindowHandle As IntPtr,
className As String,
windowName As String
) As IntPtr
public:
[DllImportAttribute(L"user32.dll")]
static IntPtr FindWindowEx(
IntPtr parentWindowHandle,
IntPtr nextChildWindowHandle,
String^ className,
String^ windowName
)
[<DllImportAttribute("user32.dll")>]
static member FindWindowEx :
parentWindowHandle : IntPtr *
nextChildWindowHandle : IntPtr *
className : string *
windowName : string -> IntPtr
Parameters
- parentWindowHandle IntPtr
- A handle to the parent window whose child windows are to
be searched.
If parentWindowHandle is NULL, the function uses the desktop window as the parent window.
The function searches among windows that are child windows of the desktop.
- nextChildWindowHandle IntPtr
- A 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
parentWindowHandle, not just a descendant window.
If nextChildWindowHandle is NULL, the search begins with the first child window of
hwndParent.
- className String
- The class name or a class atom created by a previous call to the
RegisterClass or RegisterClassEx function. The atom must be in the low-order word of
className; the high-order word must be zero.
If className points to 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.
- windowName String
- The window name (the window's title). If this parameter is NULL,
all window names match.
Return Value
IntPtr
If the function succeeds, the return value is a handle to the window that has the
specified class name and window name. If the function fails, the return value is NULL. To
get extended error information, call .
See Also