procedure TChmWriter.AddContext(AContext: DWord; ATopic: String);
I took a look at the chmhelppkg component bundled with Lazarus & my first impressions of it are that it is more of a viewer to enable the viewing of CHM files on non-Windows platforms. It renders help files poorly on Windows (garbled text, improper display of graphics, search doesn't work & non-English text is mangled on the table of contents). It would be great on Linux though. It's not what I want because it is a bit like re-inventing the wheel to use such a chm viewer on windows.
This is not strictly on topic, but does chmWriter wotk in linux?
If somebody has an example of a normal application using CHM for help, I'd like to have it.Either via lazarus' helpsystem or directly via the api
(*----------------------------------------------------------------------------- Launch an external applicationAdapted from Source: http://wiki.lazarus.freepascal.org/Executing_External_Programs------------------------------------------------------------------------------*)procedure LaunchCHMHelp(ProgramName: string);var AProcess: TProcess;begin try // Create the TProcess object, and // assign it to the var AProcess. AProcess := TProcess.Create(nil); // Use AProcess to execute the Microsoft HTML Help file in the windows directory // The "10" in "-mapid 10 ms-its:" signifies the table of contents AProcess.CommandLine := 'hh.exe' + ' ' + '-mapid 10 ms-its:' + ExtractFilePath(Application.ExeName) + ProgramName;; // Now that AProcess knows what the commandline is // we will run it. AProcess.Execute; // Free AProcess AProcess.Free; except MessageDlg('Le fichier << ' + ProgramName + ' >> est introuvable', mtError, [mbOK], 0); end;end;
procedure TfrmMainform.HelpContents1Execute(Sender: TObject);begin // Display the table of contents of the help file LaunchCHMHelp('Helpfile.chm');end;