Refresh-interface refresh function comparison

Source: Internet
Author: User

I. When will a message redraw window occur?

When you need to update or re-draw the appearance of the window, applyProgramThe wm_paint message is sent. Redraw the window.

 

Ii. What are the similarities and differences between the invalidate () -- redrawwindow () -- updatewindow () functions?

Invalidate () is to force the system to re-draw, but not necessarily immediately re-draw. Because invalidate () is only a notification system, the window has become invalid. Force the system to call wm_paint, and the message is only post, which puts the message into the message queue. The exposure is repainted only when the message wm_paint is executed.

 

Updatewindow only sends the wm_paint message to the form. before sending the message, determine whether the getupdaterect (hwnd, null, true) can be drawn in the customer region. If not, wm_paint is not sent.

 

Redrawwindow () is a double feature with invalidate () and updatewindow. The status of the Declaration window is invalid. Update the window immediately and call wm_paint to process the message immediately.

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.