The "Resources" page appears in the settings notebooks of all program files
(WPProgramFile class) and shows you the resources in the module.
Resources are read-only data objects that can be accessed
dynamically at run time.
Resource objects are placed into an executable file by the Resource
Compiler (RC.EXE
), which ships with OS/2.
Resources can be loaded by an application using a "type" and "ID" pair.
They are frequently used by applications to separate their national
language support (NLS) from the actual code. This way, applications can
be translated without having to recompile the source code. (&xwp;
does its language support this way, for example.)
The following types of resources exist:
- Mouse-pointer shape: an icon or pointer file (.ICO/.PTR format).
- Bitmap: an OS/2 bitmap (.BMP).
- Menu template: a PM menu definition; either a menu bar or a popup (context) menu.
- Dialog template: a PM dialog definition.
- String table: a string table.
- Font directory, Font: PM bitmap fonts.
- Accelerator table: a PM accelerator (hotkey, keyboard shortcut) table.
- Binary data: binary data in an undefined format.
- Error message table: an error message table.
- Dialog include-file name: file name of the dialog include file.
- Virtual key table: key to VKEY tables. I'm unsure what this is.
- Key table: key to UGL tables. I'm unsure what this is.
- Character table: Glyph-to-character tables.
This is probably used with fonts.
- Display information: screen display information. I've never seen this.
- Short-form function key area: function key area, short form.
I'm unsure what this is.
- Long-form function key area: function key area, long form.
I'm unsure what this is.
- Help table, Help subtable: help tables for PM help manager. This
allows PM to correlate dialog items and help pages, but it's terribly annoying to use.
- DBCS uniq/font driver directory, DBCS uniq/font driver: double-byte
character set (DBCS) font drivers. I'm unsure what this is.
- String ID table: resources name table. I'm unsure what this is.
- Application specific: data in an application-specific format.
Resources are either loaded as soon as the module is loaded or when needed.
Once loaded, resources are either automatically discarded when they are no longer
needed or when the module is discarded.