User32FindWindowEx(IntPtr, IntPtr, String, String) 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.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static IntPtr FindWindowEx(
IntPtr hWndParent,
IntPtr hWndChildAfter,
string className,
string windowName
)
<DllImportAttribute("User32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function FindWindowEx (
hWndParent As IntPtr,
hWndChildAfter As IntPtr,
className As String,
windowName As String
) As IntPtr
Dim hWndParent As IntPtr
Dim hWndChildAfter As IntPtr
Dim className As String
Dim windowName As String
Dim returnValue As IntPtr
returnValue = User32.FindWindowEx(hWndParent,
hWndChildAfter, className, windowName)
public:
[DllImportAttribute(L"User32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static IntPtr FindWindowEx(
IntPtr hWndParent,
IntPtr hWndChildAfter,
String^ className,
String^ windowName
)
[<DllImportAttribute("User32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member FindWindowEx :
hWndParent : IntPtr *
hWndChildAfter : IntPtr *
className : string *
windowName : string -> IntPtr
No code example is currently available or this language may not be supported.
- hWndParent IntPtr
-
A IntPtr handle to the parent window whose child windows are to be searched.
If hwndParent is Zero, the function uses the desktop window as the parent window.
The function searches among windows that are child windows of the desktop.
- hWndChildAfter IntPtr
-
A IntPtr 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 Zero,
the search begins with the first child window of hwndParent.
- className String
-
The window class name.
- windowName String
-
The window name (the window title).
If this parameter is , all window names match.
IntPtr
If the function succeeds, the return value is a
IntPtr handle to the window that
has the specified class and window names.
If the function fails, the return value is
Zero.