首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

windows编程里怎么获得窗口四个点的坐标

2012-02-25 
windows编程里如何获得窗口四个点的坐标?如题,应该用什么函数?以及获得用户区四个边界点坐标的。[解决办法]

windows编程里如何获得窗口四个点的坐标?
如题,应该用什么函数?以及获得用户区四个边界点坐标的。

[解决办法]
GetClientRect

BOOL GetClientRect(
HWND hWnd, // handle to window
LPRECT lpRect // address of structure for client coordinates
);

Parameters
hWnd
Handle to the window whose client coordinates are to be retrieved.
lpRect
Pointer to aRECT structure that receives the client coordinates. The left and top members are zero. The right and bottom members contain the width and height of the window.

热点排行