Jump to content

WinLoadHelpTable

From EDM2
Revision as of 20:38, 27 November 2023 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This function identifies the module handle and identity of the help table to the instance of the Help Manager.

Syntax

WinLoadHelpTable(hwndHelpInstance, idHelpTable, Module)

Parameters

hwndHelpInstance (HWND) - input
Handle of an instance of the Help Manager.
This is the handle returned by the WinCreateHelpInstance call.
idHelpTable (ULONG) - input
Identity of the help table.
It must be greater or equal to 0 and less or equal to 0xFFFF.
Module (HMODULE) - input
Handle of the module which contains the help table and help subtable resources.
NULLHANDLE
Use the resources file for the application.
Other
The module handle returned by the DosLoadModule or DosQueryModuleHandle call referencing a dynamic-link library containing the help resources.

Returns

rc (BOOL) - returns
Success indicator.
TRUE
Successful completion
FALSE
Error occurred.

Remarks

An application specifies or changes the handle of the module which contains the help table or the identity of the help table.

This function corresponds to the HM_LOAD_HELP_TABLE message that identifies the identifier of a help table and the handle of the module which contains the help table and its associated help subtables.

Example Code

BOOL LoadHelpTable( HWND hWnd, USHORT usResource, PSZ pszModuleName )
{
    BOOL bSuccess = FALSE;
    HMODULE hmodule;
    HWND hwndHelp;
    PSZ  pszObjNameBuf[ 80 ];

    /* Get the DLL loaded */
    if( !DosLoadModule( pszObjNameBuf, sizeof( pszObjNameBuf ),
                   pszModuleName, &hmodule ) )
    {
        /* Get the associated help instance */
        hwndHelp = WinQueryHelpInstance( hWnd );

        if( hwndHelp )
        {
            /* Pass address of help table to the Help Manager */
            bSuccess = WinLoadHelpTable( hwndHelp, usResource, hmodule );
        }
    }

    /* 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. */
ULONG      idHelpTable;       /*  Identity of the help table. */
HMODULE    Module;            /*  Handle of the module which contains the help table and help subtable resources. */
BOOL       rc;                /*  Success indicator. */

rc = WinLoadHelpTable(hwndHelpInstance, idHelpTable, Module);

Related Functions