0

I would like to display the index tab with a keyword specified and the first entry displayed.

The following code will only display the index tab with the keyword in the search field, but will not display the first entry from the list.

::HtmlHelp (::GetDesktopWindow (), m_MyChmFile, HH_DISPLAY_INDEX, (DWORD_PTR) "MyKeyword");

Using HH_ALINK_LOOKUP would do what I want, but the chm file would have to be adjusted with the keywords (links) one wants to look up.

I'd like to have a general index lookup with the first entry being selected. Is that possible?

bcause
  • 1,303
  • 12
  • 29

1 Answers1

0

I am not a C++ programmer - working more in help authoring and other programming languages e.g. Visual Basic (.net).

Nevertheless I updated my C++ CHM connection sample and tried for your need with VS 2008.

This is working for me. The entry "Flowers" is shown down in the list but the user must click to Show (in German: Anzeigen") for getting the topic content. In the case shown in the snap two topics have a keyword "flowers". http://www.help-info.de/en/Help_Info_HTMLHelp/hh_api.htm has some more HTMLHelp API information.

The four buttons code (see snap also):

    private: System::Void btnHelp_Click(System::Object^  sender, System::EventArgs^  e) {
             System::Windows::Forms::Help::ShowHelp(this, helpProvider1->HelpNamespace);
         }
    private: System::Void btnShowIndex_Click(System::Object^  sender, System::EventArgs^  e) {
             System::Windows::Forms::Help::ShowHelpIndex(this, helpProvider1->HelpNamespace);
        }
    private: System::Void btnShowIndexKeyword_Click(System::Object^  sender, System::EventArgs^  e) {
         System::Windows::Forms::Help::ShowHelp(this, helpProvider1->HelpNamespace, System::Windows::Forms::HelpNavigator::Index, L"Flowers");
        }
     private: System::Void btnShowSearchTab_Click_1(System::Object^  sender, System::EventArgs^  e) {
 System::Windows::Forms::Help::ShowHelp(this, helpProvider1->HelpNamespace, System::Windows::Forms::HelpNavigator::Find, L"Garden");
        }

enter image description here

help-info.de
  • 6,695
  • 16
  • 39
  • 41