ウィンドウをカスケード上に配置
Declare Function CascadeWindows Lib "user32.dll" _
(ByVal hWndParent As Long, ByVal wHow As Long, _
lpRect As SMALL_RECT, ByVal cKids As Long, lpkids As Any) As Integer
Declare Function CascadeWindows Lib "user32.dll" _
(ByVal hWndParent As Integer, ByVal wHow As Integer, _
lpRect As SMALL_RECT, ByVal cKids As Integer, lpkids As Integer) As Short
WORD WINAPI CascadeWindows(
HWND hwndParent,
UINT wHow,
CONST RECT *lpRect,
UINT cKids,
const HWND *lpKids
);
引数
hWndParent
親ウィンドウのハンドルwHow
動作を指定する定数lpRect
(使わないときは0)
カスケードの範囲を指定するSMALL_RECT構造体cKids
親ウィンドウのクライアント領域すべてを指定するとき、
ByVal lpRect As Longと宣言して0を設定する
lpKidsの要素数lpkids
操作する対象のウィンドウ数戻り値
正常終了のとき カスケードの対象になったウィンドウ数備考
エラーのとき 0
親ウィンドウがMDIのときは、hWndにMDI FormのhWndを渡すと動作しないのでwHowの定数
子ウィンドウの親ウィンドウを取得して、hWndに設定する。
MDITILE_SKIPDISABLED = &H2 無効のMDI子ウィンドウはタイル表示しない