[comp.sys.mac.programmer] Yet another PICT -> SCRAP Problem

dredick@vax.bbn.com (The Druid) (08/10/88)

O.K. netlanders...

I have saved a PICT resource to the SCRAP (clipboard) and I can paste it
into MacPaint, SuperPaint, and MacDraft.

But I canNOT paste it into a Word Processor such as: MacWrite or Word.

I get the rect size, but not the picture. Just a black rectangle.

Can't figure it out.  WHY does it work for graphics applications but not
for text application.

Here is the code fragment I am using...

			GetMouse(&Pt);
                        while(StillDown());
                        GetMouse(&Apt);
                        SetRect(&r,min(Pt.h,Apt.h),min(Pt.v,Apt.v), 
                                            max(Pt.h,Apt.h),max(Pt.v,Apt.v));
                        SetRect(&sr,0,0,abs(Pt.h-Apt.h),abs(Pt.v-Apt.v));
                        thePic = OpenPicture(&sr);
                        CopyBits(&window->portBits,&window->portBits,
                                                        &r,&sr,srcCopy,NIL);
                        ClosePicture();
                        ZeroScrap();
                        if(PutScrap(GetHandleSize(thePic),'PICT',
                                                    *thePic) != noErr) {
                            SysBeep(5);
                        }
                        DisposHandle(thePic);


Definitely, need help on this....

Thanks in Advance,

      -- Don Redick (a.k.a. The Druid)
                
===============================================================================
=    The Druid (dredick@bbn.com)                                              =
=                   "Did you ever feel that you were a typewriter,            =
=                    when everone else in the world was a wordprocessor"      =
===============================================================================