1 Replies - 3383 Views - Last Post: 23 September 2012 - 01:37 AM Rate Topic: -----

#1 mason2008  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 19-September 12

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?

Is This A Good Question/Topic? 0
  • +

Replies To: How to doublebuffer child controls?

#2 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 519
  • Joined: 14-January 09

Re: How to doublebuffer child controls?

Posted 23 September 2012 - 01:37 AM

Having your code would greatly assist in this.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1