I want to add menu options under Help.
Contents, Index, & Search
I have Contents and Index working right. I can not get Search to work at all.
VB Code:
  1. Const HH_DISPLAY_TOC = &H1
  2. Const HH_DISPLAY_INDEX = &H2
  3. Const HH_DISPLAY_SEARCH = &H3
  4. Const HH_DISPLAY_TOPIC = &H0
  5. Const HH_SET_WIN_TYPE = &H4
  6. Const HH_GET_WIN_TYPE = &H5
  7. Const HH_GET_WIN_HANDLE = &H6
  8. Const HH_DISPLAY_TEXT_POPUP = &HE
  9. Const HH_HELP_CONTEXT = &HF
  10. Const HH_TP_HELP_CONTEXTMENU = &H10
  11. Const HH_TP_HELP_WM_HELP = &H11
  12. Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" _
  13.          (ByVal hwndCaller As Long, ByVal pszFile As String, _
  14.          ByVal uCommand As Long, ByVal dwData As Long) As Long
In my subs for the menu I have
for Contents
HtmlHelp hwnd, App.HelpFile, HH_DISPLAY_TOC, 0
for index
HtmlHelp hwnd, App.HelpFile, HH_DISPLAY_INDEX, 0
for search
HtmlHelp hwnd, App.HelpFile, HH_DISPLAY_SEARCH, 0

The first two work fine just search does not work. Nothing happens at all.