Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "Win32API.inc"
#Include "HtmlHelp.inc"
Global hDlg as Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Test Code",300,300,200,200, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, 100,"Push", 50,10,100,20
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
If CB.Msg = %WM_Command AND CB.Ctl = 100 AND CB.Ctlmsg = %BN_Clicked Then
Local skey, sHelpFile As String, kw As HH_AKLINK
sKey = "beep"
sHelpFile = "pbwin.chm" ' file name
kw.cbStruct = SizeOf(kw) ' Build the HtmlHelp's Keyword look up UDT
kw.fReserved = 0
kw.pszKeywords = StrPtr(skey)
kw.pszUrl = 0
kw.pszMsgText = 0
kw.pszMsgTitle = 0
kw.pszWindow = 0
kw.fIndexOnFail = 1
' HTMLHelp hDlg, ByCopy sHelpFile, 0, 0 'launch Help at Index tab
' HTMLHelp hDlg, ByCopy sHelpFile, %HH_Display_TOC, 0 'launch Help file at Table of Contents
' HTMLHelp hDlg, ByCopy sHelpFile, %HH_Close_All, 0 'closes open CHM file (if parent is this dialog)
HtmlHelp hDlg, ByCopy sHelpFile, %HH_KEYWORD_LOOKUP, VarPtr(kw) 'opens at BEEP topic
End If
End Function
'gbs_00750
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm