Resource Script Files

This topic describes the resource script file used to define your application resources and explains how to compile the file and add the resources to your executable file.

Use the Resource Compiler to perform the following actions:

The following sections describe the resource script file and the RC program.

Resource Script Files

A resource script file consists of one or more resource statements that define the type, identifier, and data for each resource. For example, the following multiple-line resource statement defines a menu to be used with an application:

  MENU 1  BEGIN
      MENUITEM "Alpha", 101
      MENUITEM "Beta", 102
  END

A resource script file is a text file you can create by using an ordinary text editor. Since some resources may contain binary data that cannot be created using a text editor, many resource statements let you specify additional files to include when compiling the resource script file. For example, the following statement defines an icon and specifies the file MYICON.ICO as containing the icon data:

  ICON 1 myicon.ico

Directives

A resource script file can also contain directives. For example, the following directive includes the header file OS2.H when RC processes the resource script file:

  #include <os2.h>

Resource script files typically have the .RC file extension. .RC is the default extension; use it for all your resource script files.

Note: Although the Resource Compiler is C-like in syntax, it is not a C compiler. Use only the Resource Compiler statements.


[Back: Help]
[Next: Directives]