Enable DoubleBuffering for MdiClient

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there any way to enable double buffering in an MdiClient control? I have
a case where I need to hide all of the MdiClient forms and interactively draw
a custom background in an MdiClient control but without double buffering the
flicker is unbearable.

Thanks for any help!
Lance
 
Hi Lance,

In my opinion, there may not be a way to enable double buffering for an
MdiClient control. The MdiClient class doesn't provide a method 'SetStyle'.

You have mentioned that the MdiClient control flickers when you
interactively draw a custom background in it. Do you paint the custom
background in the Paint event handler of the MdiClient? If so, I suggest
that you only paint the region that needs to paint, i.e. use the
ClipRectangle property of the PaintEventArgs parameter.

If the problem is still not solved, you may send me a simple project that
could just reproduce the problem. To get my actual email address, remove
'online' from my displayed email address.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Linda,

Thank you for your feedback. In general I try to implement clipping as you
suggested, but in this case it is not possible because all drawn regions need
to update whenever the user changes one of the regions. In regards to
enabling double buffering do you know if there is an API method that could do
this for us?

Thanks again!
Lance
 
Hi Lance,

Thank you for your reply.

I think it would be better to address this issue if you could send me a
simple project that could just reproduce the problem.

To get my actual email address, remove 'online' from my displayed email
address.

Thank you for your understanding and cooperation!

Sincerely,
Linda Liu
Microsoft Online Community Support
 
Hi Linda,

Sorry, I should have explained that I use a considerable amount of internal
code for this part of my application. It would be fairly time consuming to
create a sample that excludes the code and still demonstrates the issue in a
way that gives you a sense for what I am doing.

Anyway, I looked into it some more and I came up with a way to get
everything to work. Thanks again for your help – it is always very much
appreciated!

Lance
 
Back
Top