### Resource Script Files (OS/2)

Use the Resource Compiler to perform the following actions:

- Create a resource script file.
- Compile the file.
- Add the file to the executable file of your application (optional).

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

Note: For more information on Resource Script Files, go to your OS/2 toolkit manual. See Supporting Documentation.

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 MENU.H when RC processes the resource script file:

>     #include "menu.h"
>     MENU WND_MAIN
>     BEGIN
>     MENUITEM "~Exit", MI_EXIT
>     END

By default, resource script files have the .RC filename extension.

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

Resource Compiler - An Overview
Resource Compiler - Syntax
Resource Compiler - An Overview
Resource Compiler - Syntax