Help-Guide Forum


Dieses Forum wurde von Help-Guide.de eingerichtet, um Fragen zu stellen oder über Dinge zu diskutieren, die sich mit der Thematik Windows Hilfen und Hilfesysteme auseinandersetzen.
Ich bitte darum, dass sich alle Teilnehmer in diesem Forum an allgemein gültige Anstandsregeln halten.

Achtung! Aufgrund der Zunahme an Spam-Einträgen habe ich mich dazu entschieden, das Posten von Einträgen nur noch registrierten Usern zu ermöglichen. Achtung!

Zurück zur Homepage

Forums-Ausgangsseite

log in | registrieren

zurück zur Übersicht
Thread-Ansicht  Board-Ansicht
Willie1(R)

13.08.2008, 10:03
 

Suchwort

Hallo Leute,
ich will eine CHM-Hilfe aus einem eigenen Programm heraus mit einem Schlüselwort der Index-Seite direkt die richtige Hilfeseite anzeigen lassen.
Der Anwender soll ein Suchwort eingeben und die Hilfe soll die entsprechende Seite anzeigen ohne dass der User erst die Hilfe-Datei aufrufen und zur Index-Sete wechseln muss. Das müsste sich doch machen lassen ?
Ging mit der alten HLP-Hilfe ohne Probleme!

MfG
Willie

Ulrich Kulle(R)

Homepage

13.08.2008, 19:33

@ Willie1
 

Suchwort

Hallo willie1

» ich will eine CHM-Hilfe aus einem eigenen Programm heraus mit einem
» Schlüselwort der Index-Seite direkt die richtige Hilfeseite anzeigen
» lassen.
» Der Anwender soll ein Suchwort eingeben und die Hilfe soll die
» entsprechende Seite anzeigen ohne dass der User erst die Hilfe-Datei
» aufrufen und zur Index-Sete wechseln muss. Das müsste sich doch machen
» lassen ?
» Ging mit der alten HLP-Hilfe ohne Probleme!

da stellt sich die Frage:
Mit welcher Programmiersprache und mit welcher Version der IDE?

Ich habe an der Thematik schon mal irgendwann "gebastelt" bin aber mit dem CHM internen Index nicht zu einem zufriedenstellenden Ergebnis gekommen.

Ist nicht ganz ohne ;-)
Für VB6 siehe und probiere die VB6_CHM.exe:
http://www.help-info.de/download/VB6_CHM.zip

---
Mit besten Grüßen
Ulrich Kulle
Microsoft MVP - Help
************************
http://www.help-info.de
Unterstützen Sie Help-Info.de durch eine PayPal Spende!
https://www.paypal.com

Ulrich Kulle(R)

Homepage

13.08.2008, 19:41

@ Willie1
 

Suchwort

und etwas Coding zum lesen ;-)

Public Sub SearchIndexKeyword(ByVal intHelpFile As Integer, ByVal sKeyword As String)
' ----------
' from http://msdn.microsoft.com/library/d...mlhelp/html/vsconStrhhaklink.asp
' new: http://msdn2.microsoft.com/en-us/library/ms524356.aspx
' modified by Ulrich Kulle [MVP]
' ------------
' cbStruct      Specifies the size of the structure. This value must always be filled in before passing the structure to the HTML Help API.
' fReserved     This parameter must be set to FALSE.
' pszKeywords   Specifies one or more ALink names or KLink keywords to look up. Multiple entries are delimited by a semicolon.
' pszUrl        Specifies the topic file to navigate to if the lookup fails. pszURL refers to a valid topic within the specified compiled help (.chm) file and does not support Internet protocols that point to an HTML file.
' pszMsgText    Specifies the text to display in a message box if the lookup fails and fIndexOnFail is FALSE and pszURL is NULL.
' pszMsgTitle   Specifies the caption of the message box in which the pszMsgText parameter appears.
' pszWindow     Specifies the name of the window type in which to display one of the following:
'               - The selected topic, if the lookup yields one or more matching topics.
'               - The topic specified in pszURL, if the lookup fails and a topic is specified in pszURL.
'               The Index tab, if the lookup fails and fIndexOnFail is specified as TRUE.
 
' fIndexOnFail  Specifies whether to display the keyword in the Index tab of the HTML Help Viewer if the lookup fails. The value of pszWindow specifies the Help Viewer.

' pszMsgText and pszMsgTitle.
' If fIndexOnFail is FALSE and pszURL is NULL, a message box appears using the text and caption specified in pszMsgText and pszMsgTitle.


' ALink name and KLink keyword lookups are case sensitive, and multiple keywords are delimited by a semicolon.
' If the lookup yields one or more matching topics, the topic titles appear in the Topics Found dialog box.
' ---------------
Dim hwnd As Long

Dim keyData As HH_AKLINK

  With keyData
    .cbStruct = Len(keyData)      ' size of this structure
    .fReserved = 0&               ' must be FALSE (really!)
    .pszKeywords = sKeyword
    .pszUrl = vbNullString
'    .pszMsgText = "keyword searched for: " + sKeyword      ' REM and message dosn't appear - test to jump to another outside topic
'    .pszMsgTitle = "Keyword Not Found"                     ' REM and message dosn't appear - test to jump to another outside topic
    .pszWindow = ""
    .fIndexOnFail = 0&            ' FALSE
  End With

'--- use HH_DISPLAY_INDEX to open the help window  ---------
'  hwnd = HTMLHelpTopic(hwnd, HFile(intHelpFile), HH_DISPLAY_INDEX, sKeyword)   ' uncomment for real search feature
'--- use HH_KEYWORD_LOOKUP to open the topic in the rigt pane  ---------
  hwnd = HtmlHelpIndex(hwnd, HFile(intHelpFile), HH_KEYWORD_LOOKUP, keyData)
  
  If keyData.pszUrl = vbNullString Then     ' --- only for test see above
    MsgBox "pszURL: is Null"
    MsgBox hwnd
    With keyData
      .cbStruct = Len(keyData)      ' size of this structure
      .fReserved = 0&               ' must be FALSE (really!)
      .pszKeywords = sKeyword
      .pszUrl = vbNullString
      .pszMsgText = "keyword searched for: " + sKeyword      ' REM and message dosn't appear
      .pszMsgTitle = "Keyword Not Found"                     ' REM and message dosn't appear
      .pszWindow = ""
      .fIndexOnFail = 0&            ' FALSE
    End With
        '--- use HH_DISPLAY_INDEX to open the help window  ---------
    HTMLHelpTopic hwnd, HFile(intHelpFile), HH_DISPLAY_INDEX, sKeyword    ' uncomment for real search feature
    '--- use HH_KEYWORD_LOOKUP to open the topic in the rigt pane  ---------
    hwnd = HtmlHelpIndex(hwnd, HFile(intHelpFile), HH_KEYWORD_LOOKUP, keyData)
  Else
    MsgBox "pszURL: is NOT Null"
    MsgBox hwnd
    With keyData
      .cbStruct = Len(keyData)      ' size of this structure
      .fReserved = 0&               ' must be FALSE (really!)
      .pszKeywords = sKeyword
      .pszUrl = vbNullString
      .pszMsgText = "keyword searched for: " + sKeyword      ' REM and message dosn't appear
      .pszMsgTitle = "Keyword Not Found"                     ' REM and message dosn't appear
      .pszWindow = ""
      .fIndexOnFail = 0&            ' FALSE
    End With
  
    '--- use HH_DISPLAY_INDEX to open the help window  ---------
    HTMLHelpTopic hwnd, HFile(intHelpFile), HH_DISPLAY_INDEX, sKeyword    ' uncomment for real search feature
    '--- use HH_KEYWORD_LOOKUP to open the topic in the rigt pane  ---------
    HtmlHelpIndex hwnd, HFile(intHelpFile), HH_KEYWORD_LOOKUP, keyData
  End If
  
End Sub

---
Mit besten Grüßen
Ulrich Kulle
Microsoft MVP - Help
************************
http://www.help-info.de
Unterstützen Sie Help-Info.de durch eine PayPal Spende!
https://www.paypal.com

Willie1(R)

14.08.2008, 12:49

@ Ulrich Kulle
 

Suchwort

Hallo Ullrich,
meine Programmiersprache ist Pascal und ich nutze Delphi 2005 und Turbo-Delphi.
... ist komplizierter als ich dachte. Du schreibst, dass die Lösung dich nicht ganz zufrieden stellt - wie muss ich das verstehen?

Ich habe seit Quick-Basic nicht mehr mit Basic programmiert, wenn du einen Source für Pascal hast, wäre das hilfreich.

MfG
W.

Ulrich Kulle(R)

Homepage

14.08.2008, 21:04

@ Willie1
 

Suchwort

Hallo Willie,

» meine Programmiersprache ist Pascal und ich nutze Delphi 2005 und
» Turbo-Delphi.
» ... ist komplizierter als ich dachte. Du schreibst, dass die Lösung dich
» nicht ganz zufrieden stellt - wie muss ich das verstehen?

Ich hatte versucht (auch mehrstufige) Keywords im Index zu finden und das geht wohl nur bedingt. Unzufrieden deshalb, weil ich das nicht sauber lösen konnte.

» Ich habe seit Quick-Basic nicht mehr mit Basic programmiert, wenn du einen
» Source für Pascal hast, wäre das hilfreich.

Einen Source für Pascal habe ich nicht. Bezüglich Delpi kann ich nur auf folgende Seite verweisen:
http://www.helpware.net/delphi/

So bleibt in jedem fall die Quälerei it der Übersetzung nach Pascal.

---
Mit besten Grüßen
Ulrich Kulle
Microsoft MVP - Help
************************
http://www.help-info.de
Unterstützen Sie Help-Info.de durch eine PayPal Spende!
https://www.paypal.com

Willie1(R)

15.08.2008, 09:07

@ Ulrich Kulle
 

Suchwort

Hallo Ullrich,


» Hallo Willie,
»
»
» Ich hatte versucht (auch mehrstufige) Keywords im Index zu finden und das
» geht wohl nur bedingt. Unzufrieden deshalb, weil ich das nicht sauber
» lösen konnte.
»
»
» Einen Source für Pascal habe ich nicht. Bezüglich Delpi kann ich nur auf
» folgende Seite verweisen:
» http://www.helpware.net/delphi/
»
Mit Delphi ab Version 9 ist die HTML-Hilfe Einbindung eigentlich kein Problem mehr.

» So bleibt in jedem fall die Quälerei it der Übersetzung nach Pascal.

Ich werde mich an die Arbeit machen.

Danke und schönen Gruß
Willie1

zurück zur Übersicht
Thread-Ansicht  Board-Ansicht
742 Postings in 299 Threads, 105 registrierte User, 5 User online (0 reg., 5 Gäste)
Help-Guide Forum | Kontakt
powered by my little forum