by Richard Russell, August 2007
If you want to utilise, in your own program, any of the example files supplied with BBC BASIC for Windows the best way of accessing them is relative to the @lib$ folder. For example, if you want to customise a toolbar using the file CDPLAYER.BMP (which contains button images for Stop, Play, Pause, Rewind and Forward) you can do so as follows:
ok% = FN_custombuttons(toolbar%, @lib$+"..\EXAMPLES\SOUNDS\CDPLAYER.BMP", \ \ nbuttons%, buttids%())
Note that the specified path locates the EXAMPLES folder relative to the LIB folder. Using this technique you can successfully access the file irrespective of where BBC BASIC for Windows is installed on your system, and wherever your program happens to be located.
In addition, use of the technique will result in the file(s) being successfully embedded in a compiled executable (see the article Embedding resources in different folders).