This function remembers the window hierarchy at the time of invocation of the call. Thereafter the information is referenced by use of the henumHenum parameter and does not change during the enumeration by the WinGetNextWindow call. The windows are enumerated in the z-order at the time enumeration is begun, with the topmost child window enumerated first.
Only the immediate children of the specified window are enumerated; child windows of the child windows are excluded.
The enumerated windows are not locked by this function and can thus be destroyed between the time that it is called and the time that the WinGetNextWindow function is used to obtain the handle for the window.