The problem of constant global refresh for plotting

Source: Internet
Author: User

The problem of constant global refresh for plotting

Flyli2008-3-16

Today, I made a very low-level mistake. I made a map with buttons. The principle is to inherit a button class and draw a picture on the button surface, to avoid the flickering problem caused by global refresh (I didn't use dual cache), I used invalidatarect to perform partial refresh for some animation effects, to minimize the flickering area, I drew an image in the background. However, if you call invalidatarect to give a valid parameter, a global refresh will be generated, I have not found any problems for a long time, and I have been depressed for a long time...

Today, I finally found the problem. It was a very low-level problem. I didn't call the overwriting function at the upper level in OnEraseBkgnd (CDC * pDC...

So I added the return CDialog: OnEraseBkgnd (CDC * pDC) statement to get everything done ~~~~~

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.