HH_DISPLAY_SEARCH
Selects the search tab and performs a search on the specified keyword(s).
Argument | Description |
---|---|
hwndCaller | Handle of the owner window or 0 |
pszFile | HTML Help URL: Compiled help (.chm) file |
uCommand | HH_DISPLAY_SEARCH |
dwData | Pointer to a THHFtsQuery record |
Return value:
On success the return value is the handle to the helpwindow that was
opened. On failure the result is 0. HH_GET_LAST_ERROR does not return usefull information.
Description:
The HH_DISPLAY_SEARCH command selects the Search tab in the navigation pane of the
HTML Help Viewer and optionally performs a search using the parameters specified by the
THHFtsQuery record. You can use this command in various ways but unfortunately it appears
not to work in the current HTML Help version (1.22). The only usage that does work is
simply showing the Search tab. See THHFtsQuery for more information.
Example:
Opens the search tab but does not initiate the search
FillChar(Qry, SizeOf(Qry), 0);
Qry.cbStruct := SizeOf(Qry);
Qry.fUniCodeStrings := False;
Qry.pszSearchQuery := nil;
Qry.iProximity := HH_FTS_DEFAULT_PROXIMITY;
Qry.fStemmedSearch := False;
Qry.fTitleOnly := False;
Qry.fExecute := False;
Qry.pszWindow := nil;
HtmlHelp(0, PChar('JediHtmlHelp.chm'),
HH_DISPLAY_SEARCH, DWORD(@Qry));
Opens the Search tab and initiates a search for the 'Command' keyword
FillChar(Qry, SizeOf(Qry), 0);
Qry.cbStruct := SizeOf(Qry);
Qry.fUniCodeStrings := False;
Qry.pszSearchQuery := 'Commands';
Qry.iProximity := HH_FTS_DEFAULT_PROXIMITY;
Qry.fStemmedSearch := False;
Qry.fTitleOnly := False;
Qry.fExecute := True;
Qry.pszWindow := nil;
HtmlHelp(0, PChar('JediHtmlHelp.chm'),
HH_DISPLAY_SEARCH, DWORD(@Qry));
Notes:
As noted above the current implementation of the HH_DISPLAY_SEARCH command does not
function correctly. You can use the first example to select the Search tab but actually
performing the search, as the second example demonstrates, doe not work.
See also:
HH_DISPLAY_TOC
HH_DISPLAY_INDEX