why not to send WM_PAINT manually

后端 未结 4 1773
一生所求
一生所求 2020-12-18 09:01

I have read that I should never send WM_PAINT manually and should call InvalidateRect instead but didn\'t found anything about why not, however. So

4条回答
  •  一生所求
    2020-12-18 10:01

    If you want to trigger an immediate repaint, the correct approach is to either:

    1. Use InvalidateRect() followed by UpdateWindow().

    2. Use RedrawWindow().

    Those will trigger a new WM_PAINT message to be generated.

提交回复
热议问题