Function Reference


_WinAPI_CascadeWindows

Cascades the specified child windows of the specified parent window

#include <WinAPISysWin.au3>
_WinAPI_CascadeWindows ( $aWnds [, $tRECT = 0 [, $hParent = 0 [, $iFlags = 0 [, $iStart = 0 [, $iEnd = -1]]]]] )

Parameters

$aWnds The array of handles to the child windows to arrange.
If a specified child window is a top-level window with the style $WS_EX_TOPMOST or $WS_EX_TOOLWINDOW, the child window is not arranged.
If this parameter is 0, all child windows of the specified parent window (or of the desktop window) are arranged.
$tRECT [optional] $tagRECT structure that specifies the rectangular area, in client coordinates, within which the windows are arranged.
This parameter can be 0 (Default), in which case the client area of the parent window is used.
$hParent [optional] Handle to the parent window. If this parameter is 0 (Default), the desktop window is assumed.
$iFlags [optional] A cascade flag. This parameter can be one or more of the following values:
    $MDITILE_SKIPDISABLED
    $MDITILE_ZORDER
$iStart [optional] The index of array to start arranging at.
$iEnd [optional] The index of array to stop arranging at.

Return Value

Success: The value is the number of windows arranged.
Failure: 0 and sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended code information.

See Also

Search CascadeWindows in MSDN Library.

Example

#include <APISysConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPIMisc.au3>
#include <WinAPISysWin.au3>
#include <WindowsConstants.au3>

_Example()

Func _Example()
        Local $aWnds[4]
        For $i = 0 To UBound($aWnds) - 1
                $aWnds[$i] = GUICreate('#' & ($i + 1), 400, 400, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SIZEBOX, $WS_SYSMENU))
                GUISetState(@SW_SHOW)
        Next

        _WinAPI_CascadeWindows($aWnds, _WinAPI_CreateRectEx(20, 20, 600, 600), 0, $MDITILE_ZORDER)

        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
EndFunc   ;==>_Example