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");
}
