Preprocessor Directives (Menus and Other Resources)
You can use the directives described in the following table as needed in your resource script. They instruct RC to perform actions or to assign values to names.
|Defines a specified name by assigning it a given value.
|Marks an optional clause of a conditional-compilation block.
|Marks the last optional clause of a conditional-compilation block.
|Marks the end of a conditional-compilation block.
|Conditionally compiles the script if a specified expression is true.
|Conditionally compiles the script if a specified name is defined.
|Conditionally compiles the script if a specified name is not defined.
|Copies the contents of a file into the resource-definition file.
|Removes the definition of the specified name.
To define symbols for your resource identifiers, use the #define directive to define them in a header file. Include this header both in the resource script and your application source code. Similarly, you define the values for resource attributes and styles by including Windows.h in the resource script.
RC treats files with the .c and .h extensions in a special manner. It assumes that a file with one of these extensions does not contain resources. If a file has the .c or .h file name extension, RC ignores all lines in the file except the preprocessor directives. Therefore, to include a file that contains resources in another resource script, give the file to be included an extension other than .c or .h.