Hallo Dieter,
danke, ein paar Minuten vorher habe ich das auch mit Erfolg versucht. Klar ist es mir zwar nicht, weil man normalerweise statt eines Literals ja auch eine Variable einsetzen kann.
Ich habe jetzt meine Anzeigeprozedur soweit fertig:
Code
' Hilfedatei (.chm) anzeigen. Mit Positionieren auf ein Keyword.
' nach einem Beispiel von RGH
' Prozedur Hilfe_anzeigen. Erfordderliche Definitionen und Deklarationen
Def HtmlHelp(4) !"HHCtrl.ocx","HtmlHelpA"
Def &HH_DISPLAY_TOPIC 0
Def &HH_DISPLAY_TOC 1
Def &HH_DISPLAY_INDEX 2
Def &HH_DISPLAY_SEARCH 3
Def &HH_SET_WIN_TYPE 4
Def &HH_GET_WIN_TYPE 5
Def &HH_GET_WIN_HANDLE 6
Def &HH_GET_INFO_TYPES 7
Def &HH_SET_INFO_TYPES 8
Def &HH_SYNC 9
Def &HH_ADD_NAV_UI 10
Def &HH_ADD_BUTTON 11
Def &HH_GETBROWSER_APP 12
Def &HH_KEYWORD_LOOKUP 13
Def &HH_DISPLAY_TEXT_POPUP 14
Def &HH_HELP_CONTEXT 15
struct tAKLIN = \
cbStruct&, \
fReserved&, \
pszKeywords&, \
pszUrl&, \
pszMsgText&, \
pszMsgTitle&, \
pszWindow&, \
fIndexOnFail&
Declare ocx&, AKLIN# ' global definiert!
' Par 0 = OpCode, Par 2 = Hilfedatei (inkl. Pfad), Par 3 = Keyword
Proc Hilfe_anzeigen
Parameters Opc%,File$,Keyword$ ' Opc% = 0 : beende DLL. Opc& = 1 : Zeige die Hilfe an
If (Opc% = 0)
case ocx&:freedll ocx&
Else
If (ocx& = 0)
ocx&=usedll("HHCtrl.ocx") ' starte die DLL
EndIf
dim AKLIN#, tAKLIN
with AKLIN#
.cbStruct& = sizeOf(AKLIN#)
.fReserved& = 0
.pszKeywords& = addr(Keyword$)
.fIndexOnFail& = 1
endwith
HtmlHelp(0, addr(File$), &HH_KEYWORD_LOOKUP, AKLIN#)
Dispose AKLIN#
EndIf
Return
EndProc
' ==============
' Programm Start
' ==============
window 10,10-250,100
Hilfe_anzeigen 1,"D:/Xprofan11/profan.chm","DrawLibicon" ' Pfad kann falsch sein
Print " Mit Eingabetaste beenden"
waitkey
' case ocx&:freedll ocx&
Hilfe_anzeigen 0 ' beende die Anzeige, freedll ocx&
End
Alles anzeigen
Das Problem mit dem Positionieren lag daran, dass ich nicht wusste, dass ich zu den angezeigten Topics (im linken Frame) noch Keywords zuordnen muss.
Damit ist meine Anfrage erledigt. ![]()
Gruß
Gerhard.