Q:

How to use double buffer in this case?

Let's say i have three control A, B, C. They are all inherited from CDialog,
A is a main dialog , A contains B, and B contains C.
and each time i use mouse mouse drag C, B and C will move together.
This is a image:http://img507.imageshack.us/img507/7039/31709956.jpg
We know this will cause B and C to redraw themselves. and it might cause flicker.
And my question is whether not there is a method to double buffer these two dialogs B and C?
I know that in XP and vista, there is a attribute WS_EX_COMPOSITED that will help, but i don't want to use this.
someone might suggest me to use memDC, but my problem is how can i merge the actions in B's ondraw and C's ondraw function into a buffer ?
Hope someone know what i said.
Thanks in advance!

A:

what helpes flickering a lot is to overload the erasebackground method. This method fills the entire background with a solid color. The paint than paints all items on it. By removing the erasebackground, the paint will just paint over stuff which is already there, thus removing flickering.

