[futurebasic] Re: [FB] Help with FB/PG PICT and TEXT resources

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: nidus@... (Chris Pereira)
Date: Sat, 29 May 1999 00:17:29 -0400
>In our final project we have a set of 50 PICT files.
>We have 50 text files also.
>I copied and pasted the PICT files into a PICT resource with 50 PICT resources.

Can I assume that you are trying to display a given PICT resource (say PICT
ID=200) and a corresponding STR# resource (STR# ID=200), and that these
resources will be available in a single resource file? If this is the case
then I have some code that can do this.

>In our program we have created a window on which we have a PICT field.
>This field will contain a picture from the clipboard and will create a PICT
>resource 4000.
>Every window that contains a PICT field will use this same resourceID PICT
>How can I set the resourceID to a difference PICT resource for each window,
>or better yet,
>just determine which one a given window PICT field will use.

Are you now saying that your program needs to be able to add new PICTs and
STR#s to the resource file from the clipboard? If so, this should be
relatively easy to do through a few Toolbox Calls (I've never done this
myself, mind you).

>What is the limit of characters in a STR# resource item?  Is there a
>different type of resource that I can use?

The resource fork of SimpleText files sometimes contain 'TEXT' and 'styl'
resources, but I don't know how they work.

Another way would be to use the data fork of your resource file to store
all of your text, but you will have to come up with a method of reading the
appropriate sections of text. Shouldn't be too difficult.

>I can send a copy of the .MAIN and .rsrc  files for you to see if this
>explanation is unclear.

If I completely missed the point, please send me the two files.