Jump to content

WinLoadHelpTable: Difference between revisions

From EDM2
Created page with "This function identifies the module handle and identity of the help table to the instance of the Help Manager. ==Syntax== WinLoadHelpTable(hwndHelpInstance, idHelpTable, Mo..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function identifies the module handle and identity of the help table to the instance of the Help Manager.  
This function identifies the module handle and identity of the help table to the instance of the Help Manager.


==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.  
;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.


;idHelpTable (ULONG) - input
==Returns==
:Identity of the help table.
;rc (BOOL) - returns:Success indicator.
:It must be greater or equal to 0 and less or equal to 0xFFFF.  
:;TRUE:Successful completion
:;FALSE:Error occurred.


;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==
==Remarks==
An application specifies or changes the handle of the module which contains the help table or the identity of the help table.
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.  
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==
==Example Code==
<pre>
<pre>
Line 77: Line 70:
* [[WinDestroyHelpInstance]]
* [[WinDestroyHelpInstance]]
* [[WinQueryHelpInstance]]
* [[WinQueryHelpInstance]]
[[Category:Win]]
[[Category:Win]]

Latest revision as of 20:38, 27 November 2023

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