Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: OpenPicture PICT --> PutScrap Message-ID: <6602@hoptoad.uucp> Date: 23 Feb 89 11:31:42 GMT References: <4Y0OgUy00UgP0Kr0F2@andrew.cmu.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 21 In article <4Y0OgUy00UgP0Kr0F2@andrew.cmu.edu> wb1j+@andrew.cmu.edu (William M. Bumgarner) writes: >I am creating a picture on the fly w/OpenPicture and subsequent calls to QD >routines followed by a close picture. > >I want this picture to be put on the clipboard as type PICT... but it refuses >to go (the type of the 'board is correct, but the data is not there). > >theErr = ZeroScrap(); >theErr = PutScrap(sizeof(scrapPict), ScrapType, &scrapPict); >KillPicture(scrapPict); Should be: ZeroScrap(); HLock(scrapPict); PutScrap(GetHandleSize(scrapPict), 'PICT', *scrapPict); HUnlock(scrapPict); KillPicture(scrapPict); -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "The government of the United States is not, in any sense, founded on the Christian religion." -- George Washington