Run a Help File with API calls in Liberty BASIC 3.
'demo to display a help file default 'contents topic 'and close it when the program ends msg$="Use the file menu to open the helpfile. " + _ "Leave the helpfile open and close the program. " + _ "The helpfile should close also." nomainwin menu #main, "&File","&Show Help",[show],_ "E&xit",[quit] statictext #main.s, msg$,10,10,200,200 open "Read My Helpfile!" for window as #main #main "trapclose [quit]" wait [show] 'Const HELP_CONTENTS = &H3& 'Displays the topic specified by the 'Contents option in the [OPTIONS] section 'of the .HPJ file. This is for backward 'compatibility. New applications should 'provide a .CNT file hWndMain=0 'use program's window handle uCommand=hexdec("&H3") lpszHelp$="liberty3.hlp" dwData=0 open "user32" for dll as #user calldll #user, "WinHelpA",_ hWndMain as ulong,_ 'window handle lpszHelp$ as ptr,_ 'name of help file uCommand as long,_ 'flag for display method dwData as long,_ 'additional data re as long close #user close #main:end