TileWindows

機能
指定のウィンドウをタイル上に表示
Declare Function TileWindows Lib "user32.dll" _
(ByVal hWndParent As Long, ByVal wHow As Long, _
lpRect As Rect, ByVal cKids As Long, lpKids As Any) As Integer
Declare Function TileWindows Lib "user32.dll" _
(ByVal hWndParent As Integer, ByVal wHow As Integer, _
lpRect As Rect, ByVal cKids As Integer, lpKids As Integer) As Short

WORD TileWindows(
HWND hwndParent,
UINT wHow,
CONST RECT *lpRect,
UINT cKids,
const HWND *lpKids
);
引数
hWndParent

親ウィンドウのハンドル
0のときはデスクトップが親ウィンドウ
wHow
動作を指定する定数
lpRect
タイリングの範囲を指定するSMALL_RECT構造体
親ウィンドウのクライアント領域すべてを指定するとき、
ByVal lpRect As Longと宣言して0を設定する
cKids
タイリングするウィンドウのハンドル数
ByVal lpKids As Longで0を設定したとき、cKidsは無視
lpkids
ハンドルを格納した配列へのポインタ
ByVal lpKids As Longで0を設定したときに
親ウィンドウの子ウィンドウすべて
戻り値
正常終了のとき  タイリングしたウィンドウの数
エラーのとき  0
備考
親ウィンドウがMDIのときは、hWndにMDI formのhWndを渡すと
動作しないので、子ウィンドウの親ウィンドウを取得して
hWndに設定する。

Windows 2.xのころのウィンドウが重ねられなかったらしい
wHowの定数

MDITILE_HORIZONTAL = &H1           水平方向
MDITILE_VERTICAL = &H0             垂直方向
サンプル
ダウンロード(SetClassLong.lzh 1.63KB)