Expand Minimize

CascadeWindows function

Cascades the specified child windows of the specified parent window.

Syntax


WORD WINAPI CascadeWindows(
  _In_opt_  HWND hwndParent,
  _In_      UINT wHow,
  _In_opt_  const RECT *lpRect,
  _In_      UINT cKids,
  _In_opt_  const HWND *lpKids
);

Parameters

hwndParent [in, optional]

Type: HWND

A handle to the parent window. If this parameter is NULL, the desktop window is assumed.

wHow [in]

Type: UINT

A cascade flag. This parameter can be one or more of the following values.

ValueMeaning
MDITILE_SKIPDISABLED
0x0002

Prevents disabled MDI child windows from being cascaded.

MDITILE_ZORDER
0x0004

Arranges the windows in Z order. If this value is not specified, the windows are arranged using the order specified in the lpKids array.

 

lpRect [in, optional]

Type: const RECT*

A pointer to a structure that specifies the rectangular area, in client coordinates, within which the windows are arranged. This parameter can be NULL, in which case the client area of the parent window is used.

cKids [in]

Type: UINT

The number of elements in the array specified by the lpKids parameter. This parameter is ignored if lpKids is NULL.

lpKids [in, optional]

Type: const HWND*

An 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 NULL, all child windows of the specified parent window (or of the desktop window) are arranged.

Return value

Type:

Type: WORD

If the function succeeds, the return value is the number of windows arranged.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

By default, CascadeWindows arranges the windows in the order provided by the lpKids array, but preserves the Z-Order. If you specify the MDITILE_ZORDER flag, CascadeWindows arranges the windows in Z order.

Calling CascadeWindows causes all maximized windows to be restored to their previous size.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Windows Overview

 

 

Community Additions

ADD
Show:
© 2014 Microsoft