Link to home
Start Free TrialLog in
Avatar of keihahe1
keihahe1

asked on

Help with help

I am creating a Help file for my Delphi-application. This proplem occur when I tried to create Topic Searc button. I don't know how to call Windows help Searc-macro from the Delphi directly. If yuo know the answer please tell it to me.
Avatar of ronit051397
ronit051397

On what tool you use to create the rtf file?
ASKER CERTIFIED SOLUTION
Avatar of sassas081597
sassas081597

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would do it like this, calls search immediately without searching for a key first :

procedure TForm1.HelpSearch(Sender: TObject);
     var
        HelpMacro:pchar;
     begin
          HelpMacro:='Search()';
          with Application do begin
               Application.HelpContext(1);
               HelpCommand(HELP_COMMAND,longint(HelpMacro));
          end;
     end;

Haven't tried out sassas code, but supose it works too, but I think it first searches for a key and if that key doesn't exists it displays the search dialog.

c.u. ZifNab
Have fun & if I'm wrong, please give me a sign.
The ZifNab code works as good as mine, however my answer is recomended by Microsoft in this partial case.
Hi sassas,

Thanks for replying at my comment and for letting me know about the recomendation of Microsoft! Do you know also why they recommend it this way? It would be great to know it.

Thanks already,
Have fun,
c.u. ZifNab;
HELP_KEY      Displays the topic in the keyword table that matches the specified keyword, if there is an exact match. If there is more than one match, displays the Index with the topics listed in the Topics Found list box.       Address of a keyword string(If 0 displays the keyboard table).
>>Taken from the Win 32 programming Reference
>>SASSAS
Thanks Sassas

Have fun,
c.u. ZifNab;