Although it is possible to create a Help file that does not use the main Help window, most Help files do have a main window. Help defines the basic characteristics of the default main Help window, but you can change these attributes if you want. You can define a total of eight attributes for the main window. Main window attributes include:
nThe title that appears in the main window’s title bar.
nThe position of the window’s upper left corner.
nThe window’s size.
nThe window’s state (maximized or normal).
nThe background color of the scrolling and nonscrolling regions.
The main window attributes are determined by the entry in the [WINDOWS] section of the Help project file and are used when the Help file is displayed. After the file is built, the main window attributes cannot be changed while the Help file is open. The window attributes do not apply to any other Help file that might be opened during a user’s session.
A main window definition has the following form:
main="caption", (x-coord, y-coord, width, height), window-state, (scrolling-RGB), (nonscrolling-RGB)
The following example shows a main window definition:
[WINDOWS]
main="Sample Help", (50, 50, 800, 900), 0, , (192,192,192)
This definition defines a main window that displays Sample Help in the title bar. The window is positioned in the upper-left corner of the screen and is 800-by-900 (in Help coordinates). The window appears in its normal state with a light grey background in the nonscrolling region.
The following sections describe each attribute in a main window definition.
Note:
The information here is a summary of the window attributes. For a complete description of each attribute, refer to the [WINDOWS] section in Chapter 16, “The Help Project File.”
The window-name must be “main” for the main Help window and cannot be changed.
The caption is the text that appears in the main window’s title bar and in the icon label when the window is minimized. In the sample definition above, the window caption is Sample Help.
The x-coord and y-coord attributes are numbers that define where the window appears on the user’s computer screen. The numbers represent the horizontal and vertical location of the upper-left corner of the window as defined in terms of Help’s 1024-by-1024 coordinate system. For example, the coordinates for the sample main window are (50, 50), or the upper-left corner of the screen.
When Help first displays the window, it uses the position values you’ve specified. Users can move the window after it has been displayed.
The width and height attributes are numbers that define the normal width and height of the window, again in terms of the Windows Help coordinate system. In the example definition, the window is 800-by-900.
When Help first displays the window, it uses the size you’ve specified. Users can change the window size after it has been displayed.
The window-state is a number (0 or 1) that indicates whether the window is displayed at normal size or maximized when Help first opens it. In the example, the main window is displayed at normal size.
The following table shows the effect of the window-state attribute.
State | Initial window position |
Normal | Window appears in the location and size defined by your position and size values. |
Maximized | Window fills the entire screen. If the user restores the window to its normal state, it occupies the part of the screen defined by your position and size values. |
Scrolling and Nonscrolling Region Background Colors
The scrolling-RGB and nonscrolling-RGB attributes are number sequences that define the background color of the window’s scrolling and nonscrolling regions. The numbers represent the red, green, and blue (RGB) components of the color. If these numbers are not given, the scrolling and nonscrolling areas use the user’s default colors as defined by the Control Panel Colors setting. Help supports any solid or dithered colors available from the Windows system colors. In the example, the main window uses light gray [(192,192,192)] as the background color for the nonscrolling region.
Use the Color setting in Control Panel to see the colors resulting from different RGB values. To change the color of text in the window, use your word processor. Format the text in the color that you want it to appear. Just remember not to create conflicts between the text color and any custom background color you might have specified.