Introduction
The Help Project File
Structured Bitmaps
Secondary Windows
Macros
MCI Functions
ExercisesWindows help however provides the capabilities to expand into areas such as multimedia, intelligent documents and computer based training. To produce such a system is simply a matter of incorporating the more advanced help features into the design process.
In order to give a flavour of how Help can be expanded we need to look at the more advanced features. These include: The Help Project file; Structured bitmaps; Secondary Windows; Macros and MCI functions.
TITLE="My Recipe Book"
type = "caption", (x, y, width, height), sizing, (clientRBG), (nonscrollRGB)The caption, if supplied, supersedes the title in the options section sizing takes the value 0 for normal window display and 1 for maximised. clientRGB and nonscrollRGB are numeric triples specifying the colours of the client window background and the non scrolling regions respectively.
The main help window is always called Main. You may choose any names and captions for your secondary windows.
Examples:
Main= ,(100,100,400,300),0
Win1="Secondary Window Win1", (10,50,850,750), 0,(128,128,128), (192,192,192)
Win2="Secondary Window Win2", (25,25, 300,300), 1
Macros can be used to modify the buttons on the main help window, modify the menu, execute other Windows programs and call functions from Windows libraries plus many other features. The complete list is available in the Help reference Help file on the network.
It consists of a compressed bitmap with additional information identifying areas of the bitmap as hotspots and coding the appropriate actions (jump, pop-up or macro) when the hotspots are selected in Windows Help. The source graphic for the Hotspot Editor can be a bitmap of a Windows metafile. The resulting structured bitmap has the .SHG extension. The hotspot editor is straightforward to use. Hotspots can be created by dragging a rectangle on the graphic image and double clicking it to allow its actions to be edited. The on-line help is informative and makes use of structured bitmaps to allow explanation of the various dialogs in the system.
e.g. Secondary WindowhcNewWind>Win2
This will cause the hotspot ‘Secondary Window’ to create a secondary window whose identification is Win2 in the [WINDOWS] section of the project file.
Secondary Windows have no buttons by default.
Macros can be combined by separating them by ‘;’ characters and so a single string can perform a set of related macros. A macro string should be no more than 512 characters and so use the short form for a macro if one exists.
A macro can be also be executed when a topic is opened. This is done by placing a ‘!’ footnote at the start of the topic. The macro string is typed in as the footnote text, in much the same way as a keyword string. There may be more than one ‘!’ footnote in a topic, thus allowing a topic to action a list of macros.
A macro can also be added to a hotspot. This is done by placing a hidden text macro sequence including an initial ‘!’ character immediately after the double underline hotspot reference. Selecting the hotspot causes the macro to be executed.
Brief macro list
The Windows Multimedia Library, MMSYSTEM.DLL, contains a function called mciSendString which can send command strings to any of the media playing (and recording) hardware in your system. The basic command strings are open, play and close although other commands can be used for more specialised functions. The commands may differ between devices, although there is a degree of consistency in the three basic commands.
To allow your help system to make use of multimedia you need to register the function mciSendString. This is done by placing the following macro in the [CONFIG] section of the help project file:
RegisterRoutine("MMSYSTEM.DLL", "mciSendString", "Suuu")
The following macro strings will allow sounds and animations to be
played, if you have the appropriate hardware.
mciSendString("open cdaudio",0,0,0);
mciSendString("set cdaudio time format tmsf",0,0,0);
mciSendString("play cdaudio from 6 to 7",0,0,0);
mciSendString("close cdaudio",0,0,0)
mciSendString("open path\name.wav alias sound",0,0,0);
mciSendString("play sound from 0 wait",0,0,0);
mciSendString("close sound",0,0,0)
mciSendString("open path\name.avi type avivideo alias video",0,0,0);
mciSendString("put video",0,0,0);
mciSendString("play video wait",0,0,0);
mciSendString("close video",0,0,0)
mciSendString("open path\name.mid type sequencer alias sound",0,0,0);
mciSendString("set sound time format ms",0,0,0);
mciSendString("play sound from 0",0,0,0);
mciSendString("close sound",0,0,0)
Copyright (C) 1995
JPS Graphics, 30 Adder Hill, Great Boughton,CHESTER, CH3 5RA, UK All rights reserved Comments to author: fcg@jpsgraph.demon.co.uk URL: HTTP://194.80.193.185/fcg/help/advhelp.htm