- // Enumerate all children
- HWND hWndNext;
-// TODO hWndNext = ::GetWindow((HWND) m_hWnd, GW_CHILD);
-
- wxWindow* child = NULL;
- if (hWndNext)
- child = CreateWindowFromHWND(this, (WXHWND) hWndNext);
-
- while (hWndNext != (HWND) NULL)
- {
-// TODO: hWndNext = ::GetWindow(hWndNext, GW_HWNDNEXT);
- if (hWndNext)
- child = CreateWindowFromHWND(this, (WXHWND) hWndNext);
- }
-
+ //
+ // Enumerate the children
+ //
+ hEnum = ::WinBeginEnumWindows(GetHwndOf(pParent));
+ while ((hWndNext = ::WinGetNextWindow(hEnum)) != NULLHANDLE)
+ pChild = CreateWindowFromHWND( this
+ ,(WXHWND)hWndNext
+ );
+ ::WinEndEnumWindows(hEnum);