Invalidate();
    UpdateWindow();
如果在view中调用的话?

解决方案 »

  1.   

    差很多!Invalidate
    The client area is ed for painting when the next WM_PAINT message occurs.UpdateWindow
    This function updates the client area of the specified window by sending a WM_PAINT message to the window if the window's update region is not empty. UpdateWindow sends a WM_PAINT message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no message is sent. Invalidate是标记窗口无效,和ValidateRect,ValidateRgn差不多。
    UpdateWindow的作用是,如果存在无效区域,则发送WM_PAINT消息。