GetNextWnd (hwnd)

Returns the next window handle in the window Z order after hwnd. This is usually the previous window that was active. GetNextWnd returns hNil if there are no other windows.

For example, if hwnd is the top-most window, then GetNextWnd(hwnd) will return the next window down. Note that if you are using SetCurrentWnd to set the front-most active window, subsequent calls to GetNextWnd are affected.