Resource Script File

The resource script file is an ASCII text file in which Presentation Manager resources are either defined or referenced. A sample resource script file is given in Figure "Resource Script File".

Note that the dialog templates are not defined directly in the resource script file, but are incorporated at the end of the resource script file using an rcinclude statement for the file mydlg.dlg. This is the typical way to incorporate dialog templates that are created by the Dialog Box Editor and stored in a DLG file.

The resource script file has a number of #include statements at the start, similar to those typically found in C programs. This is because the symbolic names used throughout the resource script file represent integer constants, and must be defined in the application's header file myappl.h. Other symbolic names may be used in the .DLG file, and must also be defined; the header file mydlg.h for these symbolic names is generated by the Dialog Box Editor. Finally, a number of symbolic names such as DID_OK and DID_CANCEL are actually defined by Presentation Manager rather than by the application, and therefore the file os2.h is also required.

The resource script file is used as input to the resource compiler provided as part of the IBM Developer's Toolkit for OS/2 2.0. For further information on the resource compiler and its operation, see Resource Compilation.


[Back: Window and Dialog Templates]
[Next: Using Resources]