请问如何能够得到窗体的宽度和高度?
请问如何能够得到窗体的宽度和高度? 问题点数:5、回复次数:3Top
1 楼liu_feng_fly(笑看风云 搏击苍穹 衔日月)回复于 2002-01-22 17:33:55 得分 5
GetWindowRect
This function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
BOOL GetWindowRect(
HWND hWnd,
LPRECT lpRect );
Parameters
hWnd
Handle to the window.
lpRect
Long pointer to a RECT structure that receives the screen coordinates of the upper-left and lower-right corners of the window.
Return Values
Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.
这样就可以得到宽度和高度了Top
2 楼vc666(vc666)回复于 2002-01-22 17:42:49 得分 0
u------pTop
3 楼vc666(vc666)回复于 2002-02-06 11:23:39 得分 0
geifenTop




