User Tools

Site Tools


Using supplied example files

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).

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
using_20supplied_20example_20files.txt · Last modified: 2018/04/17 20:22 by tbest3112