Ok, So every time the user changes the size of the window, i redraw it. But this process creates a flicker in the window. For dos programming, i would just wait for the retrace to hit the bottom, and then write the contents to the video buffer. Can this be done in windows? I think this may be a too simplistic view.
send WM_SETREDRAW with wParam==FALSE to it before resizing operation. After it 's completed, send WM_SETREDRAW with wParam==TRUE to it, followed by InvalidateRect and UpdateWindow
mega, here is a simple technique that usually reduced the amount of flicker in a window on resize, change the styles in the WNDCLASSEX structure from CS_HREDRAW or CS_VREDRAW to CS_BYTEALIGNCLIENT or CS_BYTEALIGNWINDOW. CS_HREDRAW or CS_VREDRAW make the window redraw on both vertical and horizontal resizing which makes most windows flicker. If you don't absolutely need these styles, remove them and the flicker will be reduced by a lot. Regards, firstname.lastname@example.org
don't know if this helps, but have a look at some of my sources that use backbuffering: www.safcon.cjb.net
thanks a lot for your replies I tried Steve Hutchesson advice, since it was the quickest and easiest to deploy, and it works perfectly. Thanks everyone.