TileWindows

The TileWindows function tiles the specified child windows of the specified parent window.

WORD WINAPI TileWindows(
  HWND hwndParent,        // handle to parent window
  UINT wHow,              // types of windows not to arrange
  CONST RECT *lpRect,     // rectangle to arrange windows in
  UINT cKids,             // number of windows to arrange
  const HWND FAR *lpKids  // array of window handles
);
 

Parameters

hwndParent
Handle to the parent window. If this parameter is NULL, the desktop window is assumed.
wHow
Specifies the types of windows not to arrange, and whether to tile vertically or horizontally. This parameter can be one of the following values, optionally combined with MDITILE_SKIPDISABLED to prevent disabled MDI child windows from being tiled:
Value Meaning
MDITILE_HORIZONTAL Tiles windows horizontally.
MDITILE_VERTICAL Tiles windows vertically.

lpRect
Pointer to a RECT structure that specifies the rectangular area, in client coordinates, within which the windows are arranged. If this parameter is NULL, the client area of the parent window is used.
cKids
Specifies the number of elements in the array specified by the lpKids parameter. This parameter is ignored if lpKids is NULL.
lpKids
Pointer to an array of handles to the child windows to arrange. If this parameter is NULL, all child windows of the specified parent window (or of the desktop window) are arranged.

Return Values

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

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

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later.
  Windows CE: Unsupported.
  Header: Declared in winuser.h.
  Import Library: Use user32.lib.

See Also

Windows Overview, Window Functions, CascadeWindows, RECT