Sometimes you want to use symbolic names in your resource file, and use the same names in your program to access the resources. To accomplish this, there exists a preprocessor for windres that understands pascal syntax: fprcp. This preprocessor is shipped with the Free Pascal distribution.
The idea is that the preprocessor reads a pascal unit that has some symbolic constants defined in it, and replaces symbolic names in the resource file by the values of the constants in the unit:
As an example: consider the following unit:
And the following resource file:
If you invoke windres with the preprocessor option:
then the preprocessor will replace the symbolic names ’first’, ’second’ and ’third’ with their actual values.
In your program, you can then refer to the strings by their symbolic names (the constants) instead of using a numeric index.