I am composing a help file with the free edition of Helpinator. When my user chooses Help from the menu, is there a API that I should call or do I just SHELL out to open it? I would also like for the user to be able to freely bring to focus the application's window or the help's window. Too often I have to print a help because I can't use the application again without closing the help.
Announcement
Collapse
No announcement yet.
opening a help file
Collapse
X
-
Here's the notes I have on opening Help files.
Code:'bring up contents of Help file iResult = WinHelp(Me.hwnd, "c:\yourfile.hlp") 'jump to topic (topic id=1000 in this example) iResults = WinHelp(Me.hwnd, "c:\yourfile.hlp", HELP_CONTEXT, 1000&) 'bring up search window iResults = WinHelp(Me.hwnd, "c:\yourfile.hlp", HELP_PARTIALKEY, ByVal "") 'quit Help iResults = WinHelp(Me.hwnd, "c:\yourfile.hlp", HELP_QUIT, 0&)
It's from a previous life (another language), and I've not tested it in PowerBASIC.
-
Here's the additional info on constants for the API (MSDN site), and particularly on the values to use in the API.
http://msdn.microsoft.com/en-us/library/aa975824(VS.71).aspx
And here's a PB code that works.
Code:#Compile Exe #Dim All #Include "Win32API.inc" %HELP_CONTENTS = 3 %HELP_FINDER = 11 Global hDlg As Dword, hCtl As Dword Function PBMain() As Long Dialog New 0, "PowerBASIC",300,300,100,75, %WS_SysMenu,0 To hDlg Control Add Button, hDlg, 2, "Cancel", 25, 15, 40, 20 Dialog Show Modal hDlg Call DlgProc End Function CallBack Function DlgProc() As Long If CbMsg = %WM_Command Then WinHelp (hDlg, "win32.hlp", %HELP_FINDER, 0&) End If End Function
Comment
-
Found:
Is it possible to open a specific topic from the Hh.exe command line?
Yes, try:
hh mk:@MSITStore:/path/filename.chm::/path\topicname.htm
For example, with the compiled help file htmlhelp.chm, you can use:
hh mk:@MSITStore:htmlhelp.chm::/api.htm
hh mk:@MSITStore:c:\windows\help\htmlhelp.chm::/flash\browse.htm
http://msdn.microsoft.com/en-us/library/ms669980(VS.85).aspx
Search Engine terms: chm api
Found more: http://msdn.microsoft.com/en-us/library/ms669985.aspxLast edited by colin glenn; 9 Feb 2009, 11:01 PM.Furcadia, an interesting online MMORPG in which you can create and program your own content.
Comment
-
-
Michael Mattias
Tal Systems (retired)
Port Washington WI USA
[email protected]
http://www.talsystems.com
Comment
Comment