tags:

views:

143

answers:

2

Is it possible to invalidate a window without invalidating its children? (display invalidation to cause a repaint of the parent window, but not redraw its children)

This assumes that the parent window already has the "clipchildren" style, so that its painting wouldn't inherently invalidate the children.

+2  A: 

InvalidateRect() already does this. Another way is RedrawWindow() with the RDW_NOCHILDREN option.

Hans Passant
A: 

Parent windows are always going to redraw any child windows that intersect with the window's update region.

So, really, to get the behaviour you want, when invalidating the parent window - exclude the child rects from the region you pass to InvalidateRegion.

Chris Becke