GetWindowRect和GetClientRect
来源:互联网 发布:西门子plc编程实例讲解 编辑:程序博客网 时间:2024/05/18 12:02
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
- GetClientRect和GetWindowRect封装
- GetWindowRect和GetClientRect
- GetWindowRect()和GetClientRect()
- GetWindowRect和GetClientRect本质
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect分析
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect区别
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- GetWindowRect和GetClientRect
- android 摇一摇 代码 真实可用
- 在Excel中制作能自动选择的填充的下拉菜单
- 背景建模或前景检测(Background Generation And Foreground Detection) 二
- 图表和公式的自动编号
- 项目管理-发布阶段,维护阶段
- GetWindowRect和GetClientRect
- 【转载】浅析输入法原理
- (转)【Android游戏开发二十三】自定义ListView【通用】适配器并实现监听控件!
- 第六周 项目20-b
- Storm配置项详解
- 第三届南桥杯Java第八题手机尾号
- Infragistics.Win.UltraWinGrid 单元格合并及更新
- EXT EditorGridPanel 中用复选框表示真假值,扩展官方示例
- Java反射获取泛型工具类