I really like this function, but when I used it the first control wasn't showing up in the array. I found that it was being overwritten at the end of the function when $aReturn[0][0] is being set to the number of controls. To fix this $iAdd should be initialized to 1, so you get the number of controls plus 1 (for the first element of the array which is the count). Therefore, if you have 17 controls then your array is 18 long, the first element (0) is the count, and each control is an element that follows. I have posted the updated function below.
Func _WinGetCtrlInfo($hWin)
If IsString($hWin) Then $hWin = WinGetHandle($hWin)
$iAdd = 1
Local $sClassList = WinGetClassList($hWin), $iAdd, $aDLL, $sHold
Local $aSplitClass = StringSplit(StringTrimRight($sClassList, 1), @LF), $aReturn[1][2]
For $iCount = $aSplitClass[0] To 1 Step - 1
Local $nCount = 0
While 1
$nCount += 1
If ControlGetHandle($hWin, '', $aSplitClass[$iCount] & $nCount) = '' Then ExitLoop
If Not StringInStr(Chr(1) & $sHold, Chr(1) & $aSplitClass[$iCount] & $nCount & Chr(1)) Then
$sHold &= $aSplitClass[$iCount] & $nCount & Chr(1)
$iAdd += 1
ReDim $aReturn[$iAdd][2]
$aReturn[$iAdd - 1][0] = $aSplitClass[$iCount] & $nCount
$aDLL = DllCall('User32.dll', 'int', 'GetDlgCtrlID', 'hwnd', _
ControlGetHandle($hWin, '', $aSplitClass[$iCount] & $nCount))
If @error = 0 Then
$aReturn[$iAdd - 1][1] = $aDLL[0]
Else
$aReturn[$iAdd - 1][1] = ''
EndIf
EndIf
WEnd
Next
$aReturn[0][0] = $iAdd - 1
Return $aReturn
EndFunc