[futurebasic] Re: [FB] Push button cicn in ext res file

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2005 : Group Archive : Group : All Groups

From: bernie <fblist@...>
Date: Tue, 8 Mar 2005 15:42:20 +0000
Ken answered:

>> Bernie asked:
>> I have two resource files, the application resource "app.rsrc" and an
>> external resource "ext.rsrc". Both files contain an identically
>> numbered but different resource (ID: 1001). The following code builds 
>> a
>> window with two controls, an icon push button and an icon control, and
>> both need to display the cicn contained in the external res file. The
>> icon control shows the correct cicn (the one in ext.rsrc) but the push
>> button displays the one in app.rsrc
>> Can anyone show me what I'm doing wrong here?

> Bernie,
> When you open your external resource file, be sure you point FB to it:
>
> long if fn FSMakeFSSpec(system(_aplVRefNum), system(_aplParID), 
> "ext.rsrc", fs) == _noErr
>
> // Point to the resource file you want to use
> resources "ext.rsrc"

Thanks Ken,

Unfortunately, nothing I do is ever straight forward. The code I posted 
was just an example. In the real app, the external resource filename is 
based on a user specified project name so I don't think I can use the 
resources statement [the compiler doesn't allow a string var after the 
resources statement].

It's odd that the icon control finds the correct cicn res but the push 
button doesn't (?).

Cheers
Bernie