User32EnumThreadWindows Method
Enumerates all nonchild windows associated with a thread by passing the handle to each window,
in turn, to an application-defined callback function.
EnumThreadWindows(UInt32, DelegatesEnumThreadWindowsProc, IntPtr) continues until the last window is enumerated
or the callback function returns
.
To enumerate child windows of a particular window, use the
EnumChildWindows(IntPtr, DelegatesEnumChildWindowsProc, IntPtr) function.
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", SetLastError = true)]
public static bool EnumThreadWindows(
uint threadId,
DelegatesEnumThreadWindowsProc lpEnumFunc,
IntPtr lParam
)
<DllImportAttribute("User32.dll", SetLastError := true>]
Public Shared Function EnumThreadWindows (
threadId As UInteger,
lpEnumFunc As DelegatesEnumThreadWindowsProc,
lParam As IntPtr
) As Boolean
Dim threadId As UInteger
Dim lpEnumFunc As DelegatesEnumThreadWindowsProc
Dim lParam As IntPtr
Dim returnValue As Boolean
returnValue = User32.EnumThreadWindows(threadId,
lpEnumFunc, lParam)
public:
[DllImportAttribute(L"User32.dll", SetLastError = true)]
static bool EnumThreadWindows(
unsigned int threadId,
DelegatesEnumThreadWindowsProc^ lpEnumFunc,
IntPtr lParam
)
[<DllImportAttribute("User32.dll", SetLastError = true)>]
static member EnumThreadWindows :
threadId : uint32 *
lpEnumFunc : DelegatesEnumThreadWindowsProc *
lParam : IntPtr -> bool
No code example is currently available or this language may not be supported.
- threadId UInt32
-
The identifier of the thread whose windows are to be enumerated.
- lpEnumFunc DelegatesEnumThreadWindowsProc
-
A pointer to an application-defined callback function.
- lParam IntPtr
-
An application-defined value to be passed to the callback function.
Boolean
If the callback function returns
for all windows in the thread specified by threadId,
the return value is
.
If the callback function returns
on any enumerated window,
or if there are no windows found in the thread specified by threadId,
the return value is
.