GetWindowRect和GetClientRect
来源:互联网 发布:java linux服务器 下载 编辑:程序博客网 时间:2024/06/05 02:53
原文:http://blog.chinaunix.net/u/25372/showart_304363.html
GetWindowRect是取得窗口在屏幕坐标系下的RECT坐标(包括客户区和非客户区),这样可以得到窗口的大小和相对屏幕左上角(0,0)的位置。
GetWindowRect是取得窗口在屏幕坐标系下的RECT坐标(包括客户区和非客户区),这样可以得到窗口的大小和相对屏幕左上角(0,0)的位置。
GetClientRect取得窗口客户区(不包括非客户区)在客户区坐标系下的RECT坐标,可以得到窗口的大小,而不能得到相对屏幕的位置,因为这个矩阵是在客户区坐标系下(相对于窗口客户区的左上角)的。
ClientToScreen把客户区坐标系下的RECT坐标转换为屏幕坐标系下的RECT坐标.
ScreenToClient把屏幕坐标系下的RECT坐标转换为客户区坐标系下的RECT坐标. 我们对同一个窗口先GetWindowRect取得一个RECT,再用ScreenToClient转换到客户坐标系。然后GetClientRect取得一个RECT,再用ClientToScreen转换到屏幕坐标系。显然,GetWindowRect取得的矩阵不小于GetClientRect取得的矩阵。因为前者包含了非客户区,而后包括了客户区。
对GetWindowRect取得的矩阵ScreenToClient后,矩阵的大小没有变小,(-3,-29)是窗口的左上角的坐标,相对窗口客户区左上角。
对GetClientRect取得的矩阵ClientToScreen后,矩阵也没有变大,新得到的矩阵是窗口客户区在屏幕坐标系上的RECT。
0 0
- GetWindowRect和GetClientRect
- GetWindowRect()和GetClientRect()
- GetWindowRect和GetClientRect 区别
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- GetWindowRect 和 GetClientRect
- GetClientRect和GetWindowRect封装
- GetWindowRect和GetClientRect
- GetWindowRect()和GetClientRect()
- GetWindowRect和GetClientRect本质
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect分析
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect区别
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- 设置AlertDialog的大小位置
- 2001年清华大学计算机研究生机试真题(第I套)之一
- 神经网络训练中的训练集、验证集以及测试集合
- 设置二进制
- JDom,jdom解析xml文件
- GetWindowRect和GetClientRect
- 避免物理内存碎片化
- android基础-Button
- grunt简介
- nested exception is java.lang.NoClassDefFoundError:net/sf/cglib/proxy/CallbackFilter
- JAX-WS:背后的技术JAXB及传递Map
- MySQL事务处理
- webkit学习大纲
- C++需要主要的知识汇总