总结:
InvalidateRect(rectNew, TRUE);
//Invalidates the client area within the given
//rectangle by adding that rectangle to the CWnd update region.
UpdateWindow();
//Updates the client area by sending a WM_PAINT
//message if the update region is not empty.
//The UpdateWindow member function sends a WM_PAINT
//message directly, bypassing the application queue.
//If the update region is empty, WM_PAINT is not sent.
Invalidate(FALSE);
// Invalidates the entire client area of CWnd.
除了UpdateWindow()可以避开ON_PAINT队列,直接发送消息,其它都是执行完其后的程序再响应ON_PAINT.
InvalidateRect()可以避免大范围的重绘.
还可参考:
http://www.cnblogs.com/buffer/archive/2009/03/11/1408347.html