If help tables are defined as resources, they can be bound to the application's executable file, or they can reside in a dynamic link library (DLL).
If help tables are defined as resources in a dynamic link library, the application must call DosLoadModule to load the DLL before it calls WinCreateHelpInstance. When the application calls WinCreateHelpInstance, it passes the handle to the DLL and the resource ID of the help table in the HELPINIT structure.
The application can load a new help table residing in the DLL by either sending the HM_LOAD_HELP_TABLE message from its window procedure, or by calling WinLoadHelpTable. The application passes the handle to the DLL and the resource ID of the new help table.
A HELPTABLE resource contains a HELPITEM entry for each application window, dialog, and message box for which help is provided.
Each entry of a HELPTABLE resource contains:
A HELPSUBTABLE resource contains an entry for each item that can be selected in an application window. Each of these items is assumed to be a child window of the application window identified in the HELPTABLE resource. The HELPSUBTABLE should contain a single SUBITEMSIZE and a HELPSUBITEM for each control, child window, and menu item.
Each entry of a HELPSUBTABLE resource contains:
The integer ID of the field can be a control, menu item, or message box ID. The ID specified must be unique within the table. An ID of hex FFFF is reserved for use by IPF.
The optional integers value allows the writer of the resource script file to append additional integers to the end of each HELPSUBITEM for application-specific use.
The SUBITEMSIZE keyword is used to identify the size in words of each HELPSUBITEM. All entries must be the same length. If this value is specified, it must be greater than or equal to 2. If this value is not specified, it defaults to 2.
All referenced HELPSUBTABLE resources must reside in the same .RES file as the HELPTABLE resource.
Following is an example of .RC source file for defining a HELPTABLE and its related HELPSUBTABLE resources.
HELPTABLE TABLE_1BEGIN HELPITEM parentwindow1, SUBTABLE_1, extendedhelppanel1 HELPITEM parentwindow2, SUBTABLE_2, extendedhelppanel2 END HELPSUBTABLE SUBTABLE_1 [SUBITEMSIZE subitemsize1] BEGIN HELPSUBITEM FIELD_ID1, helppanel1 [, integer1, ...n] HELPSUBITEM FIELD_ID2, helppanel2 [, integer1, ...n] END HELPSUBTABLE SUBTABLE_2 [SUBITEMSIZE subitemsize2] BEGIN HELPSUBITEM FIELD_ID3, helppanel3 [, integer1, ...n] HELPSUBITEM FIELD_ID4, helppanel4 [, integer1, ...n] END