#include Statement

Summary: Syntax

#include filename

This directive copies the contents of the file specified by filename into your resource script before the Resource Compiler processes the script. It replaces the rcinclude directive of versions prior to Windows 3.0.

The filename field is an ASCII string that specifies the DOS filename of the file to be included, using the same syntax as the C-language preprocessor #include directive. A forward slash (/) can be used instead of a backslash (for example, “root/sub”). If the filename has the .H or .C extension, only the preprocessor directives in the file are processed. Otherwise, this directive processes the entire contents of the file.

The following example demonstrates the correct usage of the #include statement:

#include “WINDOWS.H”

PenSelect MENU

BEGIN

Menuitem “&Black pen”, BLACK_PEN

END