TileWindows function (winuser.h)

Tiles the specified child windows of the specified parent window.

Syntax

WORD TileWindows(
  [in, optional] HWND       hwndParent,
  [in]           UINT       wHow,
  [in, optional] const RECT *lpRect,
  [in]           UINT       cKids,
  [in, optional] const HWND *lpKids
);

Parameters

[in, optional] hwndParent

Type: HWND

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

[in] wHow

Type: UINT

The tiling flags. 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
0x0001
Tiles windows horizontally.
MDITILE_VERTICAL
0x0000
Tiles windows vertically.

[in, optional] lpRect

Type: const RECT*

A pointer to a 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.

[in] cKids

Type: UINT

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

[in, optional] lpKids

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: 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

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

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See also

CascadeWindows

Conceptual

Other Resources

RECT

Reference

Windows