How to doublebuffer child controls?

Posted 19 September 2012 - 07:11 PM

I have a panel and I add a group of custom controls (named A) which derived from Control in this panel. In custom control A, I use override OnPaint() to draw some image and text, and add some other custom controls to it.When I use doublebuffer automatically for the panel with SetStyle(),it doesn't affect the child controls. So I use the parameter WS_EX_COMPOSITED for the panel, but the panel renders really slow,(cannot tolerate at all).

My questions are: 1.Is there a way to achieve doublebuffer manually for a control, which can affect its child controls? Or should I not use class Control to do this kind work? 2.I think there is a performance problem with my custom controls.If I change them to components and only use Onpaint() in them and in their father control, would it be helpful?