Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!labrea!rutgers!cbmvax!vu-vlsi!swatsun!jackiw From: jackiw@cs.swarthmore.edu (Nick Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: SrollRect Hassles Message-ID: <2525@ilium.cs.swarthmore.edu> Date: 6 Mar 89 14:37:57 GMT References: <1733@psu-cs.UUCP> Reply-To: jackiw@ilium.UUCP (Nick Jackiw) Distribution: usa Organization: Visual Geometry Project, Swarthmore College, PA Lines: 35 In article <1733@psu-cs.UUCP> sagar@psu-cs.UUCP (Arun Sagar) writes: > > When i try the following: > > SetPort(currentPort); > ScrollRect(¤tPort->portRect,dh,dv,NULL); > > it scrolls alright, but doesn't erase the region that it left behind > like it says in IM-I. > > sagar@psu-cs. Two possibilities. ScrollRect is supposed to fill in the "scrolled out" region with the curPort's background pattern&color. Are these set properly for you? Second, note that I.M. doesn't say you can pass a null updateRgn as your last parameter, the way you CAN pass a null maskRgn to copybits. I've had some difficulties (i. e. crashes) with attempting to pass a NIL handle for updateRgn. Try instead to pass an EMPTY rgn: aRgn:=NewRgn; ScrollRect(...,aRgn); DisposeRgn(aRgn); That might do the trick. -- +-------------------+-jackiw@cs.swarthmore.edu / !rutgers!bpa!swatsun!jackiw-+ | nicholas jackiw | jackiw%campus.swarthmore.edu@swarthmr.bitnet | +-------------------+-VGP/MathDept/Swarthmore College, Swarthmore, PA 19081--+ "Ah...I've got this CHRONIC pain." _True Believer_