GetWindowRect和GetClientRect(转)
来源:互联网 发布:手机木马软件监听器 编辑:程序博客网 时间:2024/06/05 19:25
原文: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。
- GetWindowRect和GetClientRect(转)
- GetWindowRect和GetClientRect(转)
- GetWindowRect和GetClientRect(转)
- GetWindowRect和GetClientRect(转)
- GetWindowRect和GetClientRect(转)
- GetWindowRect和GetClientRect(转)
- GetWindowRect和GetClientRect(转)
- GetWindowRect和GetClientRect
- GetWindowRect()和GetClientRect()
- GetWindowRect和GetClientRect 区别
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- GetWindowRect 和 GetClientRect
- GetClientRect和GetWindowRect封装
- GetWindowRect和GetClientRect
- GetWindowRect()和GetClientRect()
- GetWindowRect和GetClientRect本质
- Launcher: 设置壁纸_源码跟踪
- uC/OS互斥量
- 使用C语言之前必须记住的几个关键
- 大数据量,海量数据 处理方法总结
- VC中使用sqlite3_open生成的文件,提示“file is encrypted or is not a database ”
- GetWindowRect和GetClientRect(转)
- GoldenGate Extract Warning OGG-00869 Failed to Retrieve Column List Handle for Table
- 关于 C/C++中的日期和时间
- 窗体参数传递---委托、事件
- 话说localStorage的实现
- acm大赛之校园赛.
- VMware使用技巧
- 第13周报告2:定义自定义函数,计算sin和cos的近似值
- Android之Styles And Themes学习