?? getwindow.htm
字號:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style><!--
body,table {font-family:"宋體"; font-size: 9pt; line-height:11pt;}
a {text-decoration:none} a:hover {color:red;text-decoration:underline}
--></style>
<title>GetWindow</title>
</head>
<body background="../../../images/gray_weave.gif" link="#FF0000" vlink="#FF0000" alink="#FF0000" bgcolor="#FFC8C8">
<div align="center"><center>
<table border="0" width="100%" height="22" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="16"><a name="GetWindow">GetWindow</a></td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="1" width="100%" bordercolorlight="#808080" cellspacing="0"
bordercolordark="#FFFFFF">
<tr>
<td width="102%" colspan="3">VB聲明</td>
</tr>
<tr>
<td width="102%" colspan="3">Declare Function GetWindow Lib "user32" Alias
"GetWindow" (ByVal hwnd As Long, ByVal wCmd As Long) As Long</td>
</tr>
<tr>
<td width="102%" colspan="3">說明</td>
</tr>
<tr>
<td width="102%" colspan="3">獲得一個窗口的句柄,該窗口與某源窗口有特定的關系</td>
</tr>
<tr>
<td width="102%" colspan="3">返回值</td>
</tr>
<tr>
<td width="102%" colspan="3">Long,由wCmd決定的一個窗口的句柄。如沒有找到相符窗口,或者遇到錯誤,則返回零值。會設置<a
href="GetLastError.htm">GetLastError</a></td>
</tr>
<tr>
<td width="102%" colspan="3">參數表</td>
</tr>
<tr>
<td width="25%">參數</td>
<td width="77%" colspan="2">類型及說明</td>
</tr>
<tr>
<td width="25%">hwnd</td>
<td width="77%" colspan="2">Long,源窗口</td>
</tr>
<tr>
<td width="25%" rowspan="7">wCmd</td>
<td width="77%" colspan="2">Long,指定結果窗口與源窗口的關系,它們建立在下述常數基礎上:</td>
</tr>
<tr>
<td width="37%">GW_CHILD</td>
<td width="38%">尋找源窗口的第一個子窗口</td>
</tr>
<tr>
<td width="37%">GW_HWNDFIRST</td>
<td width="38%">為一個源子窗口尋找第一個兄弟(同級)窗口,或尋找第一個頂級窗口</td>
</tr>
<tr>
<td width="37%">GW_HWNDLAST</td>
<td width="38%">為一個源子窗口尋找最后一個兄弟(同級)窗口,或尋找最后一個頂級窗口</td>
</tr>
<tr>
<td width="37%">GW_HWNDNEXT</td>
<td width="38%">為源窗口尋找下一個兄弟窗口</td>
</tr>
<tr>
<td width="37%">GW_HWNDPREV</td>
<td width="38%">為源窗口尋找前一個兄弟窗口</td>
</tr>
<tr>
<td width="37%">GW_OWNER</td>
<td width="38%">尋找窗口的所有者</td>
</tr>
<tr>
<td width="102%" colspan="3">注解</td>
</tr>
<tr>
<td width="102%" colspan="3"><p align="left">兄弟或同級是指在整個分級結構中位于同一級別的窗口。如某個窗口有五個子窗口,那五個窗口就是兄弟窗口。盡管<a
name="GetWindow">GetWindow</a>可用于枚舉窗口,但倘若要在枚舉過程中重新定位、創建和清除窗口,那么<a
href="EnumWindows.htm">EnumWindows</a>和<a href="EnumChildWindows.htm">EnumChildWindows</a>更為可靠</td>
</tr>
</table>
</center></div><div align="center"><center>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><p align="right"><a href="#GetWindow">Top</a></td>
</tr>
</table>
</center></div>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -