This usually happens if you have a background brush configured for your window class (see the WNDCLASS or WNDCLASSEX structure). If there is a brush, the system will clear the window immediately after each redraw step, and then send WM_PAINT. In the case of V-Synced SwapBuffers, your image can be reset to the next resizing step before the swap buffer occurs or immediately after it, but before this part of the screen has been sent to the display device.
In any case, the solution is to set the brush in the background to NULL. Also processing the results of processing WM_ERASEBKGND messages can produce results.
EDIT due to comment
If the contents of the last frame remain visible, you probably just donβt respond to resizing using redrawing. The simplest solution for this is to call the drawing function from the WM_SIZING message handler (or WM_SIZE, just try both).
datenwolf
source share