WS_CLIPCHILDREN与WS_CLIPSIBLINGS 收藏
2014-01-22 09:51
344 查看
http://blog.163.com/sandylin_wind/blog/static/935500552008105104617806/
英文单词解释
clip:夹子、子弹夹、回形针;夹住,修剪
sibling:同胞兄弟或姐妹
overlapped:重叠
这两个Window Stype的特性与异同素来不太清楚,今日作一笔记:
MSDN的解释为:
WS_CLIPCHILDREN Excludes the area occupied by child windows when you draw within the parent window. Used when you create the parent window.
WS_CLIPSIBLINGS Clips child windows relative to each other; that is, when a particular child window receives a paint message, the WS_CLIPSIBLINGS style clips all other overlapped child windows out of the region of the
child window to be updated. (If WS_CLIPSIBLINGS is not given and child windows overlap, when you draw within the client area of a child window, it is possible to draw within the client area of a neighboring child window.) For use with the WS_CHILD style
only.
此处另有一文的解释为:
JohnCz
06-27-2006, 09:40 PM
It is not a property per se.
WS_xxx are Window styles. Both clip of area of other window when window overlaps another window.
Clip sibling for example will cause MDI child window to paint itself over another child window (sibling)
when overlapped. The same will happen
WS_CLIPCHILDREN will do exactly the same when parent overlaps child window.
综上所述
WS_CLIPCHILDREN,使得父窗体在绘制时留出其上的子窗体的位置不去画它,而那片区域留着子窗体去画。
WS_CLIPSIBLING,必须用于子窗体,使得该子窗体在收到WM_PAINT时同时令其共父的诸多子窗体(MSDN讲必须不在该区域,即不与之重叠)也会被PAINT。
//下面也是对WS_CLIPSIBLINGS的理解
所有的overlapped窗口和popup窗口,都有WS_CLIPSIBLINGS 属性,
这些窗口不能在它的sibling窗口上绘图
对于child窗口,如果没有这个属性,它能在它的sibling窗口上绘图
+-----------+
|A |
| +--------+-------
| | | B |
| | C | |
+---+-------+ |
| |
+---------------+
如果A, B都是child窗口,
如果A具有WS_CLIPSIBLINGS属性,
那么A重绘时不会重绘C部分
clip是裁减,去除的意思 相当与英文的Exclude
个人理解:WS_CLIPCHILDREN和WS_CLIPSIBLING都是为了减少重画,减少闪动,保证窗口的重叠部分只有一个窗口来实现PAINT。
英文单词解释
clip:夹子、子弹夹、回形针;夹住,修剪
sibling:同胞兄弟或姐妹
overlapped:重叠
这两个Window Stype的特性与异同素来不太清楚,今日作一笔记:
MSDN的解释为:
WS_CLIPCHILDREN Excludes the area occupied by child windows when you draw within the parent window. Used when you create the parent window.
WS_CLIPSIBLINGS Clips child windows relative to each other; that is, when a particular child window receives a paint message, the WS_CLIPSIBLINGS style clips all other overlapped child windows out of the region of the
child window to be updated. (If WS_CLIPSIBLINGS is not given and child windows overlap, when you draw within the client area of a child window, it is possible to draw within the client area of a neighboring child window.) For use with the WS_CHILD style
only.
此处另有一文的解释为:
JohnCz
06-27-2006, 09:40 PM
It is not a property per se.
WS_xxx are Window styles. Both clip of area of other window when window overlaps another window.
Clip sibling for example will cause MDI child window to paint itself over another child window (sibling)
when overlapped. The same will happen
WS_CLIPCHILDREN will do exactly the same when parent overlaps child window.
综上所述
WS_CLIPCHILDREN,使得父窗体在绘制时留出其上的子窗体的位置不去画它,而那片区域留着子窗体去画。
WS_CLIPSIBLING,必须用于子窗体,使得该子窗体在收到WM_PAINT时同时令其共父的诸多子窗体(MSDN讲必须不在该区域,即不与之重叠)也会被PAINT。
//下面也是对WS_CLIPSIBLINGS的理解
所有的overlapped窗口和popup窗口,都有WS_CLIPSIBLINGS 属性,
这些窗口不能在它的sibling窗口上绘图
对于child窗口,如果没有这个属性,它能在它的sibling窗口上绘图
+-----------+
|A |
| +--------+-------
| | | B |
| | C | |
+---+-------+ |
| |
+---------------+
如果A, B都是child窗口,
如果A具有WS_CLIPSIBLINGS属性,
那么A重绘时不会重绘C部分
clip是裁减,去除的意思 相当与英文的Exclude
个人理解:WS_CLIPCHILDREN和WS_CLIPSIBLING都是为了减少重画,减少闪动,保证窗口的重叠部分只有一个窗口来实现PAINT。
相关文章推荐
- Visual C++中MFC消息的分类
- IE8引发 VS2005/2008 MFC向导出错的解决方案
- VS2010/MFC编程入门之前言
- VS2010/MFC编程入门之二(利用MFC向导生成单文档应用程序框架)
- VS2010/MFC编程入门之三(VS2010应用程序工程中文件的组成结构)
- VS2010/MFC编程入门之四(MFC应用程序框架分析)
- VS2010/MFC编程入门之五(MFC消息映射机制概述)
- VS2010/MFC编程入门之六(对话框:创建对话框模板和修改对话框属性)
- VS2010/MFC编程入门之七(对话框:为对话框添加控件)
- VS2010/MFC编程入门之八(对话框:创建对话框类和添加控件变量)
- VS2010/MFC编程入门之十(对话框:设置对话框控件的Tab顺序)
- VS2010/MFC编程入门之十一(对话框:模态对话框及其弹出过程)
- VS2010/MFC编程入门之十二(对话框:非模态对话框的创建及显示)
- VS2010/MFC编程入门之十三(对话框:属性页对话框及相关类的介绍)
- VS2010/MFC编程入门之十四(对话框:向导对话框的创建及显示)
- VS2010/MFC编程入门之十五(对话框:一般属性页对话框的创建及显示)
- VS2010/MFC编程入门之十六(对话框:消息对话框)
- VS2010/MFC编程入门之十七(对话框:文件对话框)
- VS2010/MFC编程入门之十八(对话框:字体对话框)