Holy cow, I wrote a book!
Commenter Robert May asks via the Suggestion Box
whether there is a penalty to pay
for using WS_CLIPSIBLINGS
when the sibling windows are not overlapping.
When you use the WS_CLIPSIBLINGS style,
the window manager clips out the portion of the client rectangle
that is covered by sibling windows.
This is usually desirable behavior;
otherwise you end up with two windows trying to paint at the same
location, and somebody is likely to get hurt.
(The One notable exception is in dialog boxes,
where some controls
like the group box were designed to have other controls drawn
on top of them.)
The cost of this flag is that when it comes time to calculate
the visible region for a window,
the space occupied by
sibling windows higher in the z-order are clipped out.
This happens even
if the sibling windows don't overlap;
after all, the only way to find out whether there are any overlapping
sibling windows is to enumerate the sibling windows looking for them!
Of course, if there is in fact no overlapping, then the calculations
The only cost was the loop which determines that there are no
applicable siblings to be clipped out.