gettingstarted
[Top] [All Lists]

Re: This makes no sense

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: This makes no sense
From: Peter Gatti <petegat at ix dot netcom dot com>
Date: Sun, 16 Nov 2003 19:41:26 -0500
References: <200311160604 dot 1alnvB5si3NZFkD0 at kite>
Joe replied:

  Dim p As Picture
  p = NewPicture( myJPEG.width, myJPEG.height, 32 )
  p.graphics.DrawPicture myJPEG, 0, 0

Now, p is in a format you can stuff into a PICT resource.

Me:
Thanks for the code Joe, I'll try it and let you know how it works. You know, I 
messed with the NewPicture Method but couldn't get it to work. I see now I 
didn't know enough to include the p.graphics.DrawPicture method that your code 
has.

Joe:
But you never answered how you're adding this item to your resource fork. Depending on what RB method you're using to do this, it's possible that RB should do the conversion for you.

There's only one method described in the User's Manual, at least that I noticed.

//These are the lines that set up the file
   S=f.CreateBinaryFile("type")
   rf=f.CreateResourceFork("type")

//and this is the line that puts the pics into the resource.
rf.AddPicture(p, resource#, "pName")

I'll be interested in knowing what other ways there are for adding items to a 
resource fork.

Thank you Joe!!



- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>