Subject: Re: Creating Windows(like) Help in toolbook app.

The following information is from the Asymetrix Developers Service Program Help file:

    Displaying Help with context identifiers (OpenScript)
    Microsoft Windows Help compiler

    Your application can use context identifiers instead of keywords to
    determine the topic displayed by the WinHelp( ) function. Context
    identifiers are unique numbers defined in the [MAP] section of the
    Help project file. Each number corresponds to a context string in
    the topic file. For example, the following statement in the [MAP]
    section assigns the number 101 to the context string
    IDM_HELP_KEYBOARD:

    [MAP]
    IDM_HELP_KEYBOARD 101

    An application can display the Keyboard topic by specifying the
    context identifier in the call to the WinHelp( ) function, as in the
    following example:

    to handle buttonClick
        linkDLL "User"
            INT WinHelpNum = WinHelp(WORD,STRING,WORD,DWORD)
        end
        HELP_CONTEXT = 1
        numContext = 101
        get WinHelpNum (sysWindowHandle, \
            "myApp.hlp",HELP_CONTEXT,numContext)
    end

 Hope this helps.

 Robert

Subject: Re: Link to help topic.

From ADRAIN@LUXIAS1.MIS.EUROCONTROL.BEFri
Just happened to be working on this as the request popped up.

 --************************* Windows Help File - Contents ***********************************
 --
 -- provides access the Contents page of a Windows HELP file .

to handle  Help_General

     system filepath     -- location of book/help file
     linkDLL "user"
               int WinHelp(INT,STRING,INT,STRING)
     end linkDLL
     set x to syswindowhandle
     set HelpFile to filepath & "xxxxx.hlp"  -- specify the NAME of the help file here
     get WinHelp(syswindowhandle,HelpFile,3,StringToSearchFor)
end
 --
*******************************************************************************



 -- *****************  Help File (Windows) Context sensitive Help ************
 -- Allocate a Help File Topic number to each page
 -- These numbers are derived from the mapping in the help file
 -- They are stored on each page in a user property HelpContext

to handle help_context
     system filepath
     if HelpContext of this page  <> null
          set h to HelpContext of this page
     else
          send prompt "No Context help available for this page"
          break help_context
     end
     linkDLL "user"
          int WinHelp(INT,STRING,INT,LONG)
     end linkDLL

     set x to syswindowhandle

     set HelpFile to filepath & "xxxxxx.hlp"

     get WinHelp(syswindowhandle,HelpFile,1,h)

end
 --***************************************************************************



 -- *************  Provides direct access to Windows Help on Help ***********

to handle helponhelp
     system filepath
     linkDLL "user"
               int WinHelp(INT,STRING,INT,STRING)
     end linkDLL
     set x to syswindowhandle
     set HelpFile to filepath & "xxxxx.hlp"
     get WinHelp(syswindowhandle,HelpFile,4,StringToSearchFor)
end
 -- *************************************************************************


 -- ***********  Windows Help  - Attempts to search for the string specified in the Help file **

to handle gethelp StringToSearchFor
     system filepath
     linkDLL "user"
               int WinHelp(INT,STRING,INT,STRING)
     end linkDLL
     set x to syswindowhandle
     set HelpFile to filepath & "xxxxxxxx.hlp"
     get WinHelp(syswindowhandle,HelpFile,261,StringToSearchFor)
end
 -- *************************************************************************
From ADRAIN@LUXIAS1.MIS.EUROCONTROL.BEFri Sep 22 07:58:54 1995

Subject: RE - running a visual basic help file


>'ve designed a very simple help file using the help compiler in
>visual basic,  I'd like to call this file (at a specific topic) from
>within a toolbook application, the only commond I can find is
>executeRemote but I'm not sure.  Any help (no matter how simple or
>obvious) would be highly appreciated.
The basic idea is something like this

To find a certaiin string

to handle gethelp StringToSearchFor
     system filepath
     linkDLL "user"
          int WinHelp(INT,STRING,INT,STRING)
     end linkDLL
     set x to syswindowhandle
     set HelpFile to filepath & "foo.hlp"
     get WinHelp(syswindowhandle,HelpFile,257,StringToSearchFor)
end
to get context sensitive help

to handle contextSensitiveHelp ContextSensitiveHelpNumber

 --ContextSensitiveHelpNumber is generated by the Help compiler

     linkDLL "user"
          int WinHelp(INT,STRING,INT,LONG)
     end linkDLL

     set HelpFile to filepath & "foo.hlp"


     get WinHelp(syswindowhandle,HelpFile,1,ContextSensitiveHelpNumber)
end
There are a number of other functions as well as lots of variations in the parameters.

I use Doc to Help and Wird 6 for Help file production. The manual with this has full details of these.

Andy  (Drain.Andrew-John@eurocontrol.be)
Brian Parkhurst
University of Washington
Box 357260
Seattle, WA 98195-7260
206/543-9175