Specifying a Path to Resource Files or Bitmap Images
The PREFIX is not searched to locate resource files or bitmap
images. That implies hardcoding the path to the bitmap images or
resource files.
An alternate method is to load the path to the .bmp's and
.brf's into the global string table in an initial startup
program:
X$=stbl("!BMPS","e:/bitmaps/")
X$=stbl("!BRFS","d:/basis/resource/")
Then, access the bitmaps or resources using the string tables
as follows:
H=resopen(stbl("!BRFS")+"myres.brf")
PRINT(gui)'TITLE'(TBID,"BITMAP="+STBL("!BMPS")+"MYICON.BMP")
PRINT(gui)'IMAGE'(X1,Y1,X2,Y2,STBL("!bmps")+"MYIMAGE.BMP")
Using this method, you only have to hardcode the path to the
bitmap files in one place (the startup program), and can change
it fairly easily if needed.
|