views:

227

answers:

1

I'm trying to interface the htmlhelp api (which is a big word for one function in two variants), and I have a problem with the following usecase:

Assume I have a simple programmer's editor, with a bunch of helpfiles (.CHMs). Some are from the core runtime library, some from more exotic libraries. Assume the CHMs are crafted normally, and their indexes contains all keywords I want to search. I want to be simply able to search through the various CHMs when a user presses F1 on a keyword in the editor

So roughly I want (in pseudo code):

firstchm
while not (out of CHMs) and not Found
   {
         if keyword in CHM then
           {
             found=true;
             break;
           }  
      nextchm;  
    }

I've played a bit with HH_HELP_TOPIC, but that would pop up a window for every attempted file, and worse it would be dog slow since the CHMs would not remain cached.

Is there really no solution except DIY with e.g. chmlib? Or is it worth making a study of merged CHM files first?

Language is Delphi or clone, but anything win32/COM and somewhat readable will do.

(edit) Search results for nested index entries might be the next problem: http://stackoverflow.com/questions/563012/html-help-keyword-lookup/1384551#1384551 (/edit)

+1  A: 

Do you want to create an index or do a one-time search for these keywords?

Couldn't you extract the HTML content from the CHM files with logical filenames, search the HTML content, and relate that back to the CHM file?

Zyphrax
I want to work via the Windows API. I can already open and process the CHMs outside of that (I generated them with own code, without MS compiler), but I'd prefer to use the windows system on windows.
Marco van de Voort