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.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

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 .

Remarks

See Also