NS BASIC PegHelp Usage Example

This example shows both how to construct a help for your
application and how to invoke it.

1. CREATING THE HELP

The help consist of one or more HTML files. The files are generally
a regular HTML 3.2 files, but there are some tags that add functionality
and some specifics:

    <META HTTP-EQUIV="Htm-Help" CONTENT="NSBHelpExample.htm#Main_Contents">
    This tag defines an entry in the main system contents menu. The sytem is
    responsible for parsing the installed help files and check for this META
    tag. To make the sytem parse the file - see the "Link creation" below.
    
    <KEYWORD VALUE="nsbkeyword1;nsbkeyword2" TITLE="Topic 1" HREF="NSBHelpExample.htm#topic1">
    Put as many as you want such tags thus connecting keywords with specific topics in
    the same HTML file. This will enable the Search function in the CE Help to find them
    
    <!-- PegHelp --><BR>
    Put this tag after the heading (immediately after the BODY tag) and after each topic
    in your help files. This enables the PegHelp show separate topics from the file and enables
    you to put all or at least more topics in single file and then show them as if they are
    in spearate files. If you have any experience in WML (WAP) this is very similar to the
    deck in WML - i.e. the tag above separates "cards" in a "deck".
    So, Each topic in your help file is between <!-- PegHelp --> tags
    
    <A NAME="Main_Contents"></A>
    Assign this bookmark name to the topic that contains the general contents of
    all your help files.
    
    <A NAME="topic1"></A>
    Put a bookmark with the topic's bookmark name nearly the beginning of each
    topic
    
    <A HREF="NSBHelpExample.htm#Main_Contents">Contents</A><BR>
    When using links use the file name and the bookmark name of the topic to which the
    link leads.
    
2. CREATING LINK

The link is actually a text file with a full path to your help file. The only special
thing is that you must specify the number of the characters in the path specified
immediately before it - like this:

27#\Windows\NSBHelpExample.htm

To make this link work copy it in \Windows\Help
The link file must have a .lnk extension. To avoid problems the file
in the example is with .lnk.txt extension - remove the .txt part after
copying to the device's \Windows\Help


3. To run the example:
 - Copy the NSBHelpExample.htm in the \Windows directory
 - Copy the NSBasic PegHelp Usage Example.lnk.txt to \Windows\Help
   and remove the .txt extension fom it.
 - Compile and run (or make the exe and copy it whereever you want on the device)
   the example.
   
    The 3 first buttons show topics following the Microsoft's guidelines
    
    The 4-th button "Open without a bookmark" demonstrates what would happen
    if you use link without a bookmark - everything is shown and this may not be
    what you actually want. Still in small help systems this may be useful - just
    do not forget to design the file(s) in a manner that will display nice in the
    both ways - single topic and everything at once.
    
4. Notes on invoking the help

Notice the HelpCommand property. When it is set to 01 (Which is default) you need
to specify a topic's bookmark name in the HelpContext property. Failing to do so
will cause error (cannot find the help file) when you use the ShowHelp method.

If you want to go by without bookmarks you must set the HelpCommand to something 
else. It is recommended to use 0 in order to avoid any future problems if the
future versions of Windows CE begin to support more different commands.

This behavior (defaulting to 01 - which requires a bookmark) have been choosen
according to the guidelines in MSDN. It is intended to stimulate a kind of usage
in which the information is displayed in relatively small topics and not as huge
help files through which the user would need to scroll in order to find what he/she
looks for.