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
WM_PAINT
InvalidateRect
If you want to trigger an immediate repaint, the correct approach is to either:
Use InvalidateRect() followed by UpdateWindow().
InvalidateRect()
UpdateWindow()
Use RedrawWindow().
RedrawWindow()
Those will trigger a new WM_PAINT message to be generated.