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.
Posted on 2001-01-22 19:09:00 by mega
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
Posted on 2001-01-22 19:43:00 by Iczelion
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, hutch@pbq.com.au
Posted on 2001-01-23 06:12:00 by Steve Hutchesson
don't know if this helps, but have a look at some of my sources that use backbuffering: www.safcon.cjb.net
Posted on 2001-01-23 13:15:00 by [SaFc0n]
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.
Posted on 2001-01-24 18:04:00 by mega