Refresh window in Visual C ++
6 answers
:: InvalidateRect (hwnd, NULL, TRUE). The WinAPI function (or wnd-> InvalidateRect (NULL)) has to do the trick: it invalidates the client area and forces the system to send a WM_PAINT to the window to redraw it. If immediate redrawing is required, you should also call UpdateWindow () immediately after canceling.
+1
a source to share
It looks like you are using MFC.
I believe your application is busy and is not processing messages from the queue, so it is not processing the WM_PAINT that would update the window.
Use the RDW_UPDATENOW parameter with RedrawWindow to force redrawing even when your window is busy.
+1
a source to share