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.
keihahe1Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sassas081597Connect With a Mentor Commented:
procedure TForm1.Button1Click(...);
begin  
  Application.HelpFile := 'DELPHI.HLP';
  Application.Helpcommand(HELP_Key, 0);
end;

Use this code to get the search window of WinHelp
0
 
ronit051397Commented:
On what tool you use to create the rtf file?
0
 
ZifNabCommented:
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.
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
sassas081597Commented:
The ZifNab code works as good as mine, however my answer is recomended by Microsoft in this partial case.
0
 
ZifNabCommented:
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;
0
 
sassas081597Commented:
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
0
 
ZifNabCommented:
Thanks Sassas

Have fun,
c.u. ZifNab;
0
All Courses

From novice to tech pro — start learning today.