hhex.pp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Program Hhex;
  2. {
  3. Small example/test of the html help OCX.
  4. Marco van de Voort (C) 2009
  5. Copy ref.chm from the CHM distribution to this dir.
  6. }
  7. {$mode objfpc}{$H+}
  8. uses htmlhelp;
  9. var
  10. HelpfileName : AnsiString;
  11. htmltopic : AnsiString;
  12. res : Integer;
  13. Begin
  14. Helpfilename:='ref.chm';
  15. htmltopic := 'ref/refli3.html';
  16. Writeln('Html example 1');
  17. Writeln('note: Copy ref.chm from the CHM distribution to this dir');
  18. // HH_DISPLAY_INDEX or HH_DISPLAY_SEARCH work too.
  19. Writeln('calling TOC');
  20. Res:=HtmlHelpA(0,pchar(helpfilename) ,HH_DISPLAY_TOC,0);
  21. Writeln('program now blocked on readln, press enter (in console window) to continue');
  22. readln;
  23. writeln('Showing a topic that is probably about dialog.');
  24. // probably because due to automatic generation filenames and exact contact can drift.
  25. Res:=HtmlHelpA(0,pchar(helpfilename) ,HH_DISPLAY_TOPIC,ptruint(pchar(htmltopic)));
  26. Writeln('program now blocked on readln, press enter (in console window) to continue');
  27. readln;
  28. Writeln('ready. Note that the windows die automatically on exit of the program');
  29. {
  30. Not demoed yet : HH_HELPCONTEXT. Load on ID, because we have no files that do that yet
  31. }
  32. end.