This chapter tells you how to define Win32 resources and incorporate them into your projects.
TIP Note that you may also use the CodeWarrior® Resource Editor to create and manipulate resources visually. It's in the Thrill Seeker's portion of the CodeWarrior CD.
There are two kinds of resource files that you can include in a Win32 project:
resource script (extension .rc) is a text file containing descriptions of the desired resources.
The CodeWarrior Win32 resource compiler will compile these descriptions
into the corresponding resources, which will then be placed in
your project's object file.
resource file (extension .res) contains the resources themselves, already created by the resource
compiler and ready to be incorporated directly into your object
file.
In either case, you can have no more than one resource file in a project. You must either combine all your resource descriptions into one resource script to be passed to the resource compiler, or precompile them all into a single resource file and include that in your project.
The Win32 resource compiler (RC) is a plug-in tool for the CodeWarrior integrated development environment. It reads standard Win32 resource scripts and compiles them into resources that are then linked into your project's object file.
The CodeWarrior resource compiler accepts resource scripts in the same format as those used by the Microsoft® resource compiler. Their syntax is fully documented in the Microsoft Win32 Reference, and in the Win32 SDK online help. See in particular the following topics:
Resource scripts for the CodeWarrior resource compiler are fully compatible with those accepted by the Microsoft resource compiler, with the following exceptions:
The CodeWarrior resource compiler handles doubled double quotation
marks in the same way as the C compiler, rather than like the
Microsoft resource compiler. For example, the Microsoft resource
compiler compiles the string
""Hi Mom"
"'Hi Mom'
In the CodeWarrior resource compiler,
"""Hi Mom"
"'Hi Mom'
'Hi Mom'
To place a double quotation mark inside a string, use \" instead of "".
The CodeWarrior resource compiler ignores directory paths in file
names. For example, a resource statement such as
12 BITMAP .\..\..\res\bits\junk.bmp
12 BITMAP junk.bmp
Use the Access Paths settings panel to specify the directory in which to locate files.
Refer to the IDE User Guide for details.