今天又看到这句话,我理解是在有scroll bar的窗口程序中不需要invalidated函数来产生wm_paint消息来重绘窗口?我理解的正确否? Windows automatically invalidates the rectangle in the client area "uncovered" by the scrolling operation. This generates a WM_PAINT message. InvalidateRect is no longer needed.
就是这样的.无效的区域当然要来让他有效了哦,要让他有效当然有给他一个动作,那就是ReDrawn
!!
InvalidateRect的作用是使rect失效,windows就会相应的发出WM_PAINT消息。
在响应此消息时BeginPaint(...)使rect有效,就不会再来WM_PAINT了。
但GDI相关函数无数无数...
Windows automatically invalidates the rectangle in the client area "uncovered" by the scrolling operation. This generates a WM_PAINT message. InvalidateRect is no longer needed.