EnumWindows

  BOOL EnumWindows(lpEnumFunc, lParam)    
  WNDENUMPROC lpEnumFunc; /* address of callback function */
  LPARAM lParam; /* application-defined value */

This function enumerates all parent windows on the screen by passing the handle of each window, in turn, to the callback function pointed to by the lpEnumFunc parameter. Child windows are not enumerated.

The EnumWindows function continues to enumerate windows until the called function returns zero or until the last window has been enumerated.

Parameters

lpEnumFunc

Specifies the procedure-instance address of the callback function. For more information, see the description of the EnumWindowsProc callback function.

lParam

Specifies the value to be passed to the callback function for the application's use.

Return Value

The return value is TRUE if all windows have been enumerated. Otherwise, it is FALSE.

See Also

EnumChildWindows