GetWindowRect, GetClientRect, ScreenToClient的区别
2008-10-31 12:12
399 查看
GetWindowRect() 得到的是在屏幕坐标系下的RECT(即以屏幕左上角为原点) ,它取的是整个窗口的矩形;它获得的是窗口在屏幕上的位置,得到的结果可能是这样CRect(10,10,240,240);
GetClientRect() 得到的是在客户区坐标系下的RECT (即以所在窗口左上角为原点) , 它取的仅是客户区的矩形,也就是说不包括标题栏,外框等;它只获得了客户区的大小,因此得到的结果总是这样CRect(0,0,width,height);
ScreenToClient() 就是把屏幕坐标系下的RECT坐标转换为客户区坐标系下的RECT坐标。
GetClientRect() 得到的是在客户区坐标系下的RECT (即以所在窗口左上角为原点) , 它取的仅是客户区的矩形,也就是说不包括标题栏,外框等;它只获得了客户区的大小,因此得到的结果总是这样CRect(0,0,width,height);
ScreenToClient() 就是把屏幕坐标系下的RECT坐标转换为客户区坐标系下的RECT坐标。
相关文章推荐
- GetWindowRect、GetClientRect、ScreenToClient、ClientToScreen的区别
- GetWindowRect() ScreenToClient() ,和 GetClientRect()区别
- GetClientRect , GetWindowRect ,ClientToScreen和ScreenToClient的疑问
- VC++中的GetWindowRect,GetClientRect,ScreenToClient , ClientToScreen();
- GetWindowRect()和GetClientRect() 及ScreenToClient
- GetClientRect , GetWindowRect ,ClientToScreen和ScreenToClient的疑问
- GetWindowRect、GetClientRect、ScreenToClient与ClientToScreen
- 一个关于MoveWindow,ScreenToClient,ClientToScreen,GetWindowRect,GetClientRect的简单问题
- MFC GetWindowRect, GetClientRect和ScreenToClient
- GetWindowRect、GetClientRect、ClientToScreen、ScreenToClient
- GetWindowRect、GetClientRect、ScreenToClient与ClientToScreen 分类: VC++ 2013-10-30 08:20 1122人阅读 评论(0) 收藏
- 关于ClientToScreen、ScreenToClient、GetClientRect和GetWindowRect四个函数之间的关系
- GetWindowRect(), GetClientRect(), ScreenToClient()
- VC:GetWindowRect、GetClientRect、ScreenToClient与ClientToScreen
- GetWindowRect() GetClientRect() ScreenToClient() MoveWindow()
- GetWindowRect、GetClientRect、ScreenToClient与ClientToScreen
- GetClientRect,ClientToScreen,GetWindowRect,我的误用
- GetWindowRect再ScreenToClient和GetClientRect的探究
- GetWindowRect、GetClientRect、ScreenToClient与ClientToScreen
- GetWindowRect,GetClientRect,ScreenToClient MoveWindow SetWindowPos 用法说明