T tresss Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-04 #1 已知一个窗口的句柄.handle1.<br><br>问如何取得此窗口的大小.即width.height
W Writer Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-04 #2 int w,h;<br>RECT rect;<br>::GetWindowRect(hWnd, &rect);<br>h=rect.bottom-rect.top;//高<br>w=rect.right-rect.left;//宽
int w,h;<br>RECT rect;<br>::GetWindowRect(hWnd, &rect);<br>h=rect.bottom-rect.top;//高<br>w=rect.right-rect.left;//宽
Y ysai Unregistered / Unconfirmed GUEST, unregistred user! 2004-01-04 #3 procedure a;<br>var<br> rc : TRect;<br> h : Integer;<br> w : Integer;<br>begin<br> GetWindowRect(Handle, rc);<br> h := rc.Bottom - rc.Top;//高<br> w := rc.Right - rc.Left;//宽<br>end;
procedure a;<br>var<br> rc : TRect;<br> h : Integer;<br> w : Integer;<br>begin<br> GetWindowRect(Handle, rc);<br> h := rc.Bottom - rc.Top;//高<br> w := rc.Right - rc.Left;//宽<br>end;