Xref: utzoo comp.sys.mac.programmer:5624 comp.sys.mac:30085 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!helios.ee.lbl.gov!ux3.lbl.gov!beard From: beard@ux3.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer,comp.sys.mac Subject: Re: CopyBits in MPW C 3.0 Keywords: CopyBits , MPW C Message-ID: <2403@helios.ee.lbl.gov> Date: 13 Apr 89 16:53:54 GMT References: <225@uw-apl.UUCP> Sender: usenet@helios.ee.lbl.gov Reply-To: beard@ux3.lbl.gov (Patrick C Beard) Distribution: na Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 28 In article <225@uw-apl.UUCP> keith@uw-apl.UUCP (Keith Kerr) writes: > CopyBits(*mypixhandle, &(((GrafPtr)wind)->portBits), > &((*mypixhandle)->bounds),&((*mypixhandle)->bounds), > srcCopy, 0L); > >This compiles and works OK in MPW 2.02, but won't compile >in MPW 3.0 because of a type mismatch between formal and actual >parameters in the first argument *mypixhandle. > >Could someone please clue me in as to how to fix this??? All you need to do to convince the compiler that this is what you intended, is to use casts: HLock((Handle)mypixhandle); // since CopyBits can move memory. CopyBits((BitMap*)*mypixhandle, &(((GrafPtr)wind)->portBits), &((*mypixhandle)->bounds),&((*mypixhandle)->bounds), srcCopy, 0L); HUnlock((Handle)mypixhandle); I hope this helps. __________________ Patrick Beard PCBeard@lbl.gov BSI, Berkeley, CA ___________________