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.