What are the differences between RedrawWindow and

2019-04-22 05:38发布

问题:

What are the differences between RedrawWindow and UpdateWindow in Win32?

Since they seem to have the same purpose to refresh a window, what are the differences?

回答1:

RedrawWindow is typically used to force a redraw of the entire window (or some specified region within) right now.

UpdateWindow will force a redraw of only the update region of the window, i.e. that part of the window that has been invalidated (e.g. by calling InvalidateRect) since the last paint cycle.