Postup:
Public Const HH_DISPLAY_TOPIC
= &H0
Public Const HH_HELP_CONTEXT = &HF
Public Declare Function HtmlHelp Lib "Hhctrl.ocx" _
Alias "HtmlHelpA" (ByVal hWndCaller As Long, _
ByVal pszFile As String, ByVal uCommand As Long, _
ByVal dwData As Long) As Long
Public Function LaunchHTMLHelp(HelpFile As String, _
Optional WindowHandle As Long, Optional Topic As Long) As
Boolean
'HelpFile - cestak k souboru HTML helpu.
'WindowHandle - ukazatel na okno
'
Pokud se toto okno zav°e,
'
zav°e se i HTML Help. (pouze p°i zkompilovßnφ)
'Topic - ╚φslo kapitoly
Dim lngReturn As Long
If Len(Dir(HelpFile)) > 0 Then
If Topic = 0 Then
lngReturn
= HtmlHelp(WindowHandle, HelpFile, HH_DISPLAY_TOPIC, 0)
Else
lngReturn
= HtmlHelp(WindowHandle, HelpFile, HH_HELP_CONTEXT, Topic)
End If
LaunchHTMLHelp = CBool(lngReturn)
End If
End Function
P°φklad pou₧itφ:
x = LaunchHTMLHelp("c:\myhelp.chm",
Form1.hWnd, 5124)
|