windows Win32中的RedrawWindow和UpdateWindow有什么区别?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7360500/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What are the differences between RedrawWindow and UpdateWindow in Win32?
提问by jondinham
What are the differences between RedrawWindow and UpdateWindow in Win32?
Win32中的RedrawWindow和UpdateWindow有什么区别?
Since they seem to have the same purpose to refresh a window, what are the differences?
既然它们似乎具有相同的刷新窗口的目的,那么它们之间的区别是什么?
回答by David Heffernan
RedrawWindow
is typically used to force a redraw of the entire window (or some specified region within) right now.
RedrawWindow
通常用于立即强制重绘整个窗口(或其中的某些指定区域)。
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.
UpdateWindow
将仅强制重绘窗口的更新区域,即InvalidateRect
自上次绘制周期以来已失效(例如通过调用)的窗口部分。