Autor Beitrag
landwehr
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Di 30.07.13 17:11 
Hallo,

ich muss in einem alten Projekt, welches unter Delphi 6 entwickelt wurde, die Hilfe einbinden. Mit Help and Manual habe ich eine *.chm erzeugt. Wie wird diese nun in Delphi 6 eingebunden? Kann mir jemand helfen.

Vielen Dank im voraus.

Walter
Mathematiker
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2622
Erhaltene Danke: 1448

Win 7, 8.1, 10
Delphi 5, 7, 10.1
BeitragVerfasst: Di 30.07.13 17:48 
Hallo,
du brauchst die Unit htmlhelp.pas von Ufuk Keskinoz. (u.a. www.torry.net/pages.php?s=94)
Danach verfahre ich mit
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.Hilfe1Click(Sender: TObject);
const
    HH_HELP_CONTEXT = $F;
    MYHELP_FILE : string = 'xxxxx.chm' + Chr(0);
begin
    HH(application.Handle, PChar(xxxxordner+MYHELP_FILE), HH_HELP_CONTEXT, helpcontext);
end;

wobei xxxxx.chm und xxxxordner entsprechend zu wählen sind.
Als helpcontext übergibst Du die in der *.h-Datei festgelegte ganze Zahl zur jeweiligen Seite Deines Hilfetextes.

Beste Grüße
Mathematiker
Einloggen, um Attachments anzusehen!
_________________
Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord. Albert Einstein
landwehr Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Mi 31.07.13 11:27 
Danke es funktioniert.
Walter
landwehr Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Do 15.08.13 17:10 
Ich muss nochmals auf dieses Thema zurückkommen. Das Aufrufen der Hilfe funktioniert leider nicht mit der F1 Taste. Mit jeder anderen Funktionstatse geht es. Ich denke das Delphi die F1 Taste für den Hilfeaufruf einer *.hlp Datei nutzt. Setze ich im OI den Helpkontext z.B. auf 1000 kommt die Meldung nach drücken der F1 Taste. Die Datei ist keine Windows-Hilfedatei, oder Sie ist beschädigt. Kann ich irgendwo in Delphi 6 die F1 Taste für mich nutzen. Das OnKeyDown Ereigniss wird bei allen F-Tasten außer der F1 ausgeführt. Ich könnte natürlich die F2 Taste als Hilfe-Taste benutzen, entspricht aber leider nicht meinen und sicherlich auch nicht des Anwenders Vorstellungen.

Danke für eine schnelle Antwort.


Zuletzt bearbeitet von landwehr am Do 15.08.13 17:20, insgesamt 1-mal bearbeitet
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Do 15.08.13 17:17 
Versuch es einmal mit dem Delphi HH Kit samt D6OnHelpFix, zu finden hier.
landwehr Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Do 15.08.13 17:21 
HH Kit geht nur für hlp Hilfe und nicht für chm Hilfe.
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Do 15.08.13 17:39 
Wo hast Du das denn her? Natürlich kann man damit *.chm einbinden.
Mathematiker
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2622
Erhaltene Danke: 1448

Win 7, 8.1, 10
Delphi 5, 7, 10.1
BeitragVerfasst: Do 15.08.13 19:03 
Hallo,
user profile iconlandwehr hat folgendes geschrieben Zum zitierten Posting springen:
Ich muss nochmals auf dieses Thema zurückkommen. Das Aufrufen der Hilfe funktioniert leider nicht mit der F1 Taste.

Wie rufst Du mit der Taste F1 auf? Von allein ist sie nicht vordefiniert.

Ich verbinde einen Menüpunkt "?", der die Hilfe ruft, immer mit dem Hotkey F1. Und es funktioniert immer.

Beste Grüße
Mathematiker

_________________
Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord. Albert Einstein
landwehr Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Do 15.08.13 19:50 
Im Ereignis FormKeyDown
KeyPreview steht auf True

Alle Funktionstasten gehen nur die F1 nicht.


1:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
 

procedure TfrmMitgliederverwaltung.FormKeyDown(Sender: TObject;
  var Key: Word; Shift: TShiftState);
var Path : String;
const
   HH_HELP_CONTEXT = $F;
   MYHELP_FILE : String = 'Verein.chm' + Chr(0);

begin
   Path := ToolsSystem.GetWorkPath + 'Hilfe\' + MYHELP_FILE;
   if Key =  VK_F1 then  // VK_F2 - VK_F12 gehen alle nur F1 nicht.
   begin
     case pgcMitglied.TabIndex of
       0:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1002);
       1:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1003);
       2:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1004);
       3:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1005);
       4:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1006);
       5:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1007);
       6:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1008);
       7:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1009);
       8:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1010);
       9:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1011);
       10:
         HH(Application.Handle, PChar(Path), HH_HELP_CONTEXT, 1012);
     end;
   end;
end;
WasWeißDennIch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 653
Erhaltene Danke: 160



BeitragVerfasst: Do 15.08.13 20:09 
landwehr Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Fr 16.08.13 14:33 
Problem ist gelöst. Hatte sich doch im Menü ein ShortCut mit F1 versteckt. Nun ist alles gut.