WS_CLIPCHILDREN與WS_CLIPSIBLINGS 收藏
睿豐德科技 專注RFID識別技術和條碼識別技術與管理軟件的集成項目。質量追溯系統、MES系統、金蝶與條碼系統對接、用友與條碼系統對接
英文單詞解釋
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 PMIt 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。RFID管理系統集成商 RFID中間件 條碼系統中間層 物聯網軟件集成
clip:夾子、子彈夾、回形針;夾住,修剪
sibling:同胞兄弟或姐妹
overlapped:重疊
這兩個Window Stype的特性與異同素來不太清楚,今日作一筆記:
MSDN的解釋為:
此處另有一文的解釋為:
JohnCz 06-27-2006, 09:40 PMIt 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。RFID管理系統集成商 RFID中間件 條碼系統中間層 物聯網軟件集成