1.4.4 Microsoft Windows Resource Compiler

Most Windows applications use a variety of resources, each defined in a file called a resource-definition (.RC) file. After creating the resource-definition file, you use Windows Resource Compiler (RC) to compile it and add the compiled resources to the application's executable file. When the application runs, it can load and use the resources from the executable file.

Following is an example of a resource-definition file that defines two resources, a cursor and an icon:

Bullseye CURSOR bullseye.cur
Generic ICON generic.ico

The first statement defines a cursor resource by naming it (Bullseye), declaring its type (CURSOR), and specifying the file that contains the cursor image (BULLSEYE.CUR). The second statement does the same for an icon resource.

To compile a resource-definition file and add the compiled resources to an executable file, use the RC command. Following is a typical RC command:

rc generic.rc

For a description of how to use RC, see Microsoft Windows Programming Tools. For a description of the resource statements that make up a resource-definition file, see the Microsoft Windows Programmer's Reference, Volume 4.