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 follwoing unit:
unit myunit;
interface Const First = 1; Second = 2: Third = 3; Implementation end. |
And the following resource file:
#include "myunit.pp"
STRINGTABLE { First, "hello World !" Second, "hello world again !" Third, "last hello world !" } |
if you invoke windres with the --preprocessor option:
windres --preprocessor fprcp -i myunit.rc -o myunit.res
|
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.