Staz Software
HomeFutureBasicSharewareOrderContact

Tech Notes

Auto Renumbering of Duplicate Resources

One of FB^3’s really cool new features is that it can handle multiple resource files. Each file is added in order as it is encountered in the project (or in the form of RESOURCES lines). A problem can arise when you have more than one resource with the same ID number in more than one file. FB^3 handles this by letting the latest resource replace previously moved duplicates.

There are times, however, when you may want all versions of a resource to remain available without disturbing previously added versions from other files. FB^3 has a provision for this and it is easy to follow. Number your resources with IDs between 32512 and 32767 (inclusive). When FB encounters something in this range, it will be renumbered if a duplicate has already been added to the newly created application.

Example: You have pictures in two resource files with the same ID. You want to keep both versions.

RESOURCES "Flintstones1.rsrc"
REM includes _"PICT" ID 32512 named "Fred"

RESOURCES "Flintstones2.rsrc"
REM includes _"PICT" ID 32512 named "Wilma"

Your final application will contain two picture resources:

_"PICT"    ID 32512    named "Fred"
_"PICT"    ID 32513    named "Wilma"

To access a particular picture, do so by name.

rHndl& = FN GETNAMEDRESOURCE(_"PICT","Wilma")

FutureBASIC

Demo

Order

Tour

Tech Notes

FAQ

Sample Code

Web Sites

Mailing List

System
Requirements

blank