VB聲明 |
|
Declare Function CascadeWindows% Lib "user32" (ByVal hwndParent As Long, ByVal wHow As Long, lpRect As RECT, ByVal cKids As Long, lpKids As Long) Declare Function CascadeWindowsBynum% Lib "user32" Alias "CascadeWindows" (ByVal hwndParent As Long, ByVal wHow As Long, ByVal lpRect As Long, ByVal cKids As Long, ByVal lpKids As Long) |
|
說明 |
|
以層疊方式排列窗口(在vb里使用:位于頂部或被所有的窗口沒有問題。原文:No problem for top level windows or owned windows.) |
|
返回值 |
|
Integer,排列成功的窗口數(shù)量,零表示失敗 |
|
參數(shù)表 |
|
參數(shù) |
類型及說明 |
hwndParent |
Long,指定一個父窗口;準(zhǔn)備對它的子窗口進行排列。用GetDesktopWindow函數(shù)獲得頂級窗口的句柄 |
wHow |
Long,MDITILE_SKIPDISABLED——不排列已被禁用的MDI子窗口 |
lpRect |
RECT,指定一個矩形,矩形區(qū)域中的窗口才會層疊處理??稍O(shè)為NULL,表示使用整個客戶區(qū) |
cKids |
Long,在lpKids數(shù)組中指定的子窗口數(shù)量 |
lpKids |
Long,子窗口列表中準(zhǔn)備排列的第一個元素。如傳遞NULL(注意將參數(shù)定義成ByVal)。Long,則表示排列所有的子窗口(原文:Long--First element in list of child windows to arrange. Pass NULL (be sure to define parameter as ByVal - Long, to arrange all child windows.) |
注解 |
|
在正式的win32文檔里,對這個函數(shù)的說明是不正確的。這兒的參數(shù)建立在實際的win32 C 頭文件基礎(chǔ)上。函數(shù)不能對諸如控件的子窗口產(chǎn)生——只對頂級窗口及MDI子有用。注意在MDI窗體的情況下,指定的父窗口應(yīng)是MDIClient窗口的句柄,不應(yīng)是MDI窗體本身的窗口句柄。可用api函數(shù)GetParent獲得正確的句柄 |