win12.hlp (Table of Contents; Topic list)
WinQueryHelpInstance (1.2)
Function Group  Message group  Overview         Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINHELP
 
HWND WinQueryHelpInstance(hwndApp)
HWND hwndApp;    /* handle of application window */
 
The WinQueryHelpInstance function retrieves the handle of the help instance
associated with the given window.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hwndApp    Identifies a window for which the associated help instance is
           queried.
 
Return Value
 
The return value is the handle of the associated help instance if the
function is successful; it is FALSE if an error occurs.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     HMERR_INVALID_QUERY_APP_WND
     HMERR_NO_HELP_INST_IN_CHAIN
 
Comments
 
The function traces the chain of parent windows, starting with the given
window, until it finds a frame window with an associated help instance or
finds the desktop. If it finds the desktop, it traces the chain of owner
windows, starting with the given window, until it finds a frame window with
an associated help instance or the desktop.
 
See Also
 
WinAssociateHelpInstance