How do I simultaneously display a container and its child controls
I have seen similar posts as this throughout the web and the community, but cannot seem to locate an answer. It seems the regions where controls are laid out are not invalidated by the container and show the window beneath.
I see this with switching between forms, but in my case I also see it when switching between tab pages. I have tried setting double-buffering through SetStyle and overriding OnPaintBackground for the controls, the parent container, the tab page... but nothing works. It doesn't matter how many controls are on the form, its just that its a little more noticeable with many controls. (Also note, this happens with both my custom controls and framework controls)
Basically, I think I'm looking for a painting technique for how to paint a container and it's children before displaying the container... or at the very least paint the background of the container so that windows behind it are not displayed (although the latter is not preferred).

How do I simultaneously display a container and its child controls?
CsNetworks
Yes, a container does paint itself and then its children. The question is whether there is a built in way to optimize the display (like double buffer an entire container) so that both the container and its children are rendered at the same time... so you don't get the domino effect of controls painted one at a time. My plan, unless someone has another suggestion, is to render the current page into a bitmap and blit it over the top of the one coming up...
See these other similar posts...
Hey, thanks for your responses :)
Sri_Prad
Dan Miser
You must enter a user name before continuing.
A possible solution was to set WS_CLIPCHILDREN to false when a container goes through OnLayout. Then you would flip a bit so that children are clipped during normal painting. This looked promissing until applied to something like splitters where you get a lot of flicker. Also, it doesn't look real good since everything is your BackColor until the controls are drawn..but looks better than seeing what was behind the container previously. I still think I will have to use some sort of transition to take attention from the way this works in Windows.
So, is the solution you talk about part of Vista or WPF Did they make a change in the GDI layer
Rui Sun