# Function Reference

# _WinAPI_EnumChildWindows

Enumerates a child windows that belong to the specified parent window

#include <WinAPISysWin.au3>
_WinAPI_EnumChildWindows ( $hWnd [, $bVisible = True] )

## Parameters

$hWnd | Handle to the parent window whose child windows are to be enumerated. If this parameter is 0, this function is equivalent to _WinAPI_EnumWindows().
$bVisible | [optional] Specifies whether enumerates the invisible window, valid values: True - Enumerate only visible windows (Default). False - Enumerate all windows.

## Return Value

Success: | The 2D array of the handles to the child windows and classes for the specified parent window. [0][0] - Number of rows in array (n) [0][1] - Unused [n][0] - Window handle [n][1] - Window class name
Failure: | Sets the @error flag to non-zero.

## See Also

Search EnumChildWindows in MSDN Library.

## Example

    #include <Array.au3>
    #include <WinAPISysWin.au3>

    Local $hForm = GUICreate('Test ' & StringReplace(@ScriptName, '.au3', '()'), 310, 360)
    GUISetFont(8.5, 400, 0, 'MS Shell Dlg', $hForm)
    GUICtrlCreateGroup('Group', 10, 10, 140, 95)
    GUICtrlCreateCheckbox('Check1', 22, 26, 120, 23)
    GUICtrlCreateCheckbox('Check2', 22, 49, 120, 23)
    GUICtrlCreateCheckbox('Check3', 22, 72, 120, 23)
    GUICtrlCreateGroup('Group', 160, 10, 140, 95)
    GUICtrlCreateRadio('Radio1', 172, 26, 120, 23)
    GUICtrlCreateRadio('Radio2', 172, 49, 120, 23)
    GUICtrlCreateRadio('Radio3', 172, 72, 120, 23)
    GUICtrlCreateButton('OK', 120, 330, 70, 23)
    GUICtrlCreateTab(10, 118, 292, 206)
    GUICtrlCreateTabItem('Tab1')
    GUICtrlCreateTabItem('Tab2')
    GUICtrlCreateTabItem('')
    GUISetState(@SW_SHOW)

    Local $aData = _WinAPI_EnumChildWindows($hForm)

    _ArrayDisplay($aData, '_WinAPI_EnumChildWindows')

    GUIDelete()