VB聲明 |
|
Declare Function AdjustWindowRect Lib "user32" Alias "AdjustWindowRect" (lpRect As RECT, ByVal dwStyle As Long, ByVal bMenu As Long) As Long Declare Function AdjustWindowRectEx Lib "user32" Alias "AdjustWindowRectEx" (lpRect As RECT, ByVal dsStyle As Long, ByVal bMenu As Long, ByVal dwEsStyle As Long) As Long |
|
說明 |
|
在給定一種窗口樣式的前提下,計算獲得目標客戶區(qū)矩形所需的窗口大小 |
|
返回值 |
|
Long,如執(zhí)行成功,則返回非零值;如失敗,返回零值。會設置GetLastError |
|
參數表 |
|
參數 |
類型及說明 |
lpRect |
RECT,最初包含要求的客戶區(qū)。由函數設為目標窗口矩形大小 |
dwStyle |
Long,窗口樣式 |
bMenu |
Long,如窗口有菜單,則設為TRUE(非零) |
dwEsStyle |
Long,擴展窗口樣式(只適用于AdjustWindowRectEx) |
注解 |
|
在調用本函數前,先用GetWindowLong取得一個窗體的樣式。如菜單占用兩行以上的空間,則函數不能正確計算大小。如程序使用了多行標題,則應使用GetSystemMetrics |