WinCreateHelpTable: Difference between revisions
Appearance
Created page with "This function is used to identify or change the help table. ==Syntax== WinCreateHelpTable(hwndHelpInstance, phtHelpTable) ==Parameters== ; hwndHelpInstance (HWND) - input ..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function is used to identify or change the help table. | This function is used to identify or change the help table. | ||
==Syntax== | ==Syntax== | ||
Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hwndHelpInstance (HWND) - input | ;hwndHelpInstance (HWND) - input:Handle of an instance of the Help Manager. | ||
:Handle of an instance of the Help Manager. | :This is the handle returned by the WinCreateHelpInstance call. | ||
:This is the handle returned by the WinCreateHelpInstance call. | ;phtHelpTable (PHELPTABLE) - input:Help table allocated by the application. | ||
==Returns== | ==Returns== | ||
; rc (BOOL) - returns | ;rc (BOOL) - returns:Success indicator. | ||
:Success indicator. | :;TRUE:Successful completion | ||
:;TRUE | :;FALSE:Error occurred. | ||
:;FALSE | |||
==Remarks== | ==Remarks== | ||
This function corresponds to the HM_CREATE_HELP_TABLE message that identifies a help table that is in memory. | This function corresponds to the HM_CREATE_HELP_TABLE message that identifies a help table that is in memory. | ||
==Example Code== | ==Example Code== | ||
This example creates a help table in memory and passes the table to the Help Manager via WinCreateHelpTable. The help instance must have been created by WinCreateHelpInstance. | This example creates a help table in memory and passes the table to the Help Manager via WinCreateHelpTable. The help instance must have been created by WinCreateHelpInstance. | ||
<pre> | <pre> | ||
#define INCL_WINHELP | #define INCL_WINHELP | ||
Line 90: | Line 87: | ||
* WinDestroyHelpInstance | * WinDestroyHelpInstance | ||
* WinLoadHelpTable | * WinLoadHelpTable | ||
* WinQueryHelpInstance | * WinQueryHelpInstance | ||
==Related Messages== | ==Related Messages== | ||
* HM_CREATE_HELP_TABLE | * HM_CREATE_HELP_TABLE | ||
[[Category:Win]] | [[Category:Win]] |
Latest revision as of 15:06, 16 May 2023
This function is used to identify or change the help table.
Syntax
WinCreateHelpTable(hwndHelpInstance, phtHelpTable)
Parameters
- hwndHelpInstance (HWND) - input
- Handle of an instance of the Help Manager.
- This is the handle returned by the WinCreateHelpInstance call.
- phtHelpTable (PHELPTABLE) - input
- Help table allocated by the application.
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE
- Successful completion
- FALSE
- Error occurred.
Remarks
This function corresponds to the HM_CREATE_HELP_TABLE message that identifies a help table that is in memory.
Example Code
This example creates a help table in memory and passes the table to the Help Manager via WinCreateHelpTable. The help instance must have been created by WinCreateHelpInstance.
#define INCL_WINHELP #include <os2.h> /* DEFINEs for window id's, menu items, controls, panels, etc. should */ /* be inserted here or in additional include files. */ /* Subtable for the main window's help */ HELPSUBTABLE phtMainTable[] = { 2, /* Length of each entry */ /* Fill in one line for each menu item */ IDM_FILE, PANELID_FILEMENU, IDM_FILENEW, PANELID_FILENEW, IDM_FILEOPEN, PANELID_FILEOPEN, IDM_FILESAVE, PANELID_FILESAVE, IDM_FILESAVEAS, PANELID_FILESAVEAS, IDM_FILEEXIT, PANELID_FILEEXIT }; /* Subtable for the dialog window's help */ HELPSUBTABLE phtDlgTable[] = { 2, /* Length of each entry */ /* Fill in one line for each control */ IDC_EDITFLD, PANELID_DLGEDITFLD, IDC_OK, PANELID_DLGOK, IDC_CANCEL, PANELID_DLGCANCEL, IDC_HELP, PANELID_HELP }; /* Help table for the applications context sensitive help */ HELPTABLE phtHelpTable[]= { WINDOWID_MAIN, phtMainTable, PANELID_MAINEXT, WINDOWID_DLG, phtDlgTable, PANELID_DLGEXT, 0, NULL, 0 }; BOOL CreateHelpTable( HWND hWnd ) { BOOL bSuccess = FALSE; HWND hwndHelp; /* Get the associated help instance */ hwndHelp = WinQueryHelpInstance( hWnd ); if( hwndHelp ) { /* Pass address of help table to the Help Manager */ bSuccess = WinCreateHelpTable( hwndHelp, phtHelpTable ); } /* return success indicator */ return bSuccess; }
Definition
#define INCL_WINHELP /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HWND hwndHelpInstance; /* Handle of an instance of the Help Manager. */ PHELPTABLE phtHelpTable; /* Help table allocated by the application. */ BOOL rc; /* Success indicator. */ rc = WinCreateHelpTable(hwndHelpInstance, phtHelpTable);
Related Functions
- WinAssociateHelpInstance
- WinCreateHelpInstance
- WinDestroyHelpInstance
- WinLoadHelpTable
- WinQueryHelpInstance
Related Messages
- HM_CREATE_HELP_TABLE