Invalidate () Invalidates the entire window client area. The invalid client area of a window means that a redraw is required, for example, if a window obscured by another window becomes a foreground window, the part that was obscured is invalid and needs to be redrawn. Windows then places the WM_PAINT message in the application's message queue. MFC provides a WM_PAINT message handler function for the window class Onpaint,onpaint is responsible for redrawing the window. There are some exceptions to the view class, and the OnDraw function is called in the OnPaint function of the view class, and the actual redraw work is done by OnDraw. When the parameter berase is true, the background in the redraw area will be erased, otherwise the background will remain unchanged. 1, when finished painting related operations (SetIcon) can use
Invalidate to update the window. 2. If you call the Invalidate () function in the paint message handler function, the interface will blink continuously.
UpdateData (TRUE) to update the value of the variable based on the contents of the dialog box.
UpdateData (FALSE) updates the contents of the dialog box based on the value of the variable. UpdateData does not redraw the window.
UpdateWindow This function causes the window to redraw immediately, with a higher priority than
Invalidate .
Window effective Function UpdateData