EnumThreadWindows  4AFXTTP 

The EnumThreadWindows function enumerates all nonchild windows associated with a thread by passing the handle of each window, in turn, to an application-defined callback function. EnumThreadWindows continues until the last window is enumerated or the callback function returns FALSE. To enumerate child windows of a particular window, use the EnumChildWindows function. This function supersedes the EnumTaskWindows function.

BOOL EnumThreadWindows(

    DWORD dwThreadId,

// thread identifier

    WNDENUMPROC lpfn,

// pointer to callback function

    LPARAM lParam

// application-defined value

   );

 

 

Parameters

dwThreadId

Identifies the thread whose windows are to be enumerated.

lpfn

Points to an application-defined callback function. For more information about the callback function, see the EnumThreadWndProc callback function.

lParam

Specifies a 32-bit, application-defined value to be passed to the callback function.

 

Return Values

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

See Also

EnumChildWindows, EnumThreadWndProc, EnumWindows