Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!pasteur!ucbvax!hplabs!hp-pcd!hpcvlx!bturner From: bturner@hpcvlx.cv.hp.com (Bill Turner) Newsgroups: comp.windows.ms Subject: Re: scrolling windows Message-ID: <106580078@hpcvlx.cv.hp.com> Date: 14 Dec 89 17:44:27 GMT References: <33182@ucbvax.BERKELEY.EDU> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 33 > Hi, why is it that every time a window is scrolled UpdatedWindow() has to > be called to make sure everything looks updated. Is there any way to > scroll content of a window without calling UpdatedWindow() and getting > instanteneous screen update. ScrollWindow moves the bits, and leaves the "uncovered" portion invalidated (just as if InvalidateRect had been called). That leaves a pending paint, which is done either as the last message before the message queue empties, or immediately if UpdateWindow is called. The only other way to handle this would be to explicitily call some repainting code yourself after doing the ScrollWindow, but since you've already got the WM_PAINT handler around why not use it? > On a related note, is it possible to process WM_PAINT message, without > calling BeginPaint/EndPaint. No, BeginPaint and EndPaint do housekeeping that let Windows know the painting has actually be done. If you don't call them, you will continue to receive WM_PAINT messages. (NOTE: do NOT call BeginPaint or EndPaint unless you are processing a WM_PAINT message!) > Both of the questions have to do with the fact that I need to speed > up window scroll/update performance. One thing I'd suggest is looking at the general performance of your WM_PAINT handler. Is it possible you could pay attention to the update region to avoid unnecessary output calls? [I don't know if you can really get it as fast as you'd like -- I ran some timing tests, and all the Windows graphics output calls are slow if not clipped (i.e., if they actually do transfer bits to the screen), and clipped output isn't too slow.] --Bill Turner (bturner@hp-pcd.hp.com) HP Corvallis Information Systems