Retrieves the handle of a control in the specified dialog box
#include <WinAPISysWin.au3>
_WinAPI_GetDlgItem ( $hWnd, $iItemID )
| $hWnd | Handle to the dialog box |
| $iItemID | Specifies the identifier of the control to be retrieved |
| Success: | The window handle of the given control |
| Failure: | 0, call _WinAPI_GetLastError() to get extended error information |
You can use the GetDlgItem function with any parent-child window pair, not just with dialog boxes.
As long as the $hWnd parameter specifies a parent window and the child window has a unique identifier, GetDlgItem returns a valid handle to the child window.
Search GetDlgItem in MSDN Library.