By defining help tables and subtables in memory, you can dynamically change a single entry in the help table. You can add a new window ID to be associated with a field, or add fields that are to be associated with existing windows.

After the help table structure is initialized, the application can pass IPF the address in memory of the new help table, either by sending the HM_CREATE_HELP_TABLE message from its window procedure, or by calling WinCreateHelpTable.

When defining help tables in memory, the data structures in PMHELP.H are used. The help table contains the structure for each application window. This structure holds the following information:

These entries are integers. The last entry in the list contains a NULL for each entry type, to indicate the end of the list. The following is an example of a help table for an application.

HELPSUBTABLE        table1, table2, table3,                    table4, table5;

HELPTABLE     helpTableEntry [] =
{
  APP_WIND_1,  &table1, idExtHelp1,
  APP_WIND_2,  &table2, idExtHelp2,
  APP_WIND_3,  &table3, idExtHelp3,
  APP_WIND_4,  &table4, idExtHelp4,
  APP_WIND_5,  &table5, idExtHelp5,
  0,           NULL,    NULL
};

The help subtable contains the structure defined in the PMHELP.H file for each application window. This structure holds the following information for each field in the application window:

The last entry in the structure contains the word length for each field entry. The minimum number of words is two, which is the default. The following is an example of a help subtable for an application window that has six fields.

HELPSUBTABLE        HelpSubTable [] ={
  2,
  FIELD_ID_1, IDRES_HELP1,
  FIELD_ID_2, IDRES_HELP2,
  FIELD_ID_3, IDRES_HELP3,
  FIELD_ID_4, IDRES_HELP4,
  FIELD_ID_5, IDRES_HELP5,
  FIELD_ID_6, IDRES_HELP6,
  0,          0
};


[Back] [Next]