This example uses WinEnumDlgItem to query the first dialog item for each immediate child of the specified dialog window. The immediate children are enumerated using a WinBeginEnumWindows - WinGetNextWindow - WinEndEnumWindows loop.

#define INCL_WINDIALOGS      /* Window Dialog Mgr functions        */
#define INCL_WINWINDOWMGR    /* Window Manager functions           */
#include <os2.h>

HWND  hwndDlg;               /* Handle of the parent dialog window */
HWND  hwndChild;             /* Current dialog child               */
HWND  hwndItem;              /* First dialog item                  */
HENUM  henum;                /* Enumeration handle                 */
BOOL  fSuccess;              /* Success indicator                  */

henum = WinBeginEnumWindows(hwndDlg);
while ((hwndChild = WinGetNextWindow(henum)) != NULL)
      hwndItem = WinEnumDlgItem(hwndDlg, hwndChild, EDI_FIRSTTABITEM);
fSuccess = WinEndEnumWindows (henum);


[Back] [Next]