[next] [prev] [prev-tail] [tail] [up]

### 12.2 Creating resources

The Free Pascal compiler itself doesn’t create any resource files; it just compiles them into the executable. To create resource files, you can use some GUI tools as the Borland resource workshop; but it is also possible to use a WI N D O W S resource compiler like G N U windres. windres comes with the G N U binutils, but the Free Pascal distribution also contains a version which you can use.

The usage of windres is straightforward; it reads an input file describing the resources to create and outputs a resource file.

A typical invocation of windres would be

     windres -i mystrings.rc -o mystrings.res

this will read the mystrings.rc file and output a mystrings.res resource file.

A complete overview of the windres tools is outside the scope of this document, but here are some things you can use it for:

stringtables
  that contain lists of strings.
bitmaps
  which are read from an external file.
icons
  which are also read from an external file.
Version information
  which can be viewed with the WI N D O W S explorer.
Menus
  Can be designed as resources and used in your GUI applications.
Arbitrary data
  Can be included as resources and read with the windows API calls.

Some of these will be described below.

[next] [prev] [prev-tail] [front] [up]