Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 3 - Help Manager / Help Manager Reference
Resources


The Rectangle Help Resource

You can use a rectangle help resource to define hot rectangles for displaying help balloons within a static window, and to specify the help messages for those balloons. A rectangle help resource is a resource of type 'hrct'. All 'hrct' resources must have resource IDs greater than 128.

To associate the hot rectangles and help messages defined in an 'hrct' resource with a particular window, you must also create a window help ('hwin') resource, which is described in "Associating Help Resources With Static Windows" on page 3-63.

The format of a Rez input file for an 'hrct' resource differs from its compiled output form. This section describes the structure of a Rez-compiled 'hrct' resource. If you are concerned only with creating 'hrct' resources, see "Specifying Help for Rectangles in Windows" on page 3-62 for a detailed description of how to use Rez input files to create 'hrct' resources.

An 'hrct' resource consists of a header component and a variable number of hot-rectangle components. Figure 3-35 shows the general structure of a compiled 'hrct' resource.

Figure 3-35 Structure of a compiled rectangle help ('hrct') resource

If you examine a compiled version of an 'hrct' resource, you find that the header component consists of the following elements:

The Help Manager determines the end of the 'hrct' resource by using the component count information in the header component.

The structures of the hot-rectangle components depend on identifiers specified inside the components. The identifiers used in a Rez input file are described in "Specifying the Format for Help Messages" on page 3-21.

Figure 3-36 shows the structure of a component that stores its help message as a Pascal string within the 'hrct' resource itself.

Figure 3-36 Structure of an 'hrct' component compiled with the HMStringItem identifier

If you examine a compiled version of an 'hrct' resource, you find that a component identified in a Rez input file by the HMStringItem identifier consists of the following elements:

Figure 3-37 shows the structure of a hot-rectangle component that specifies its help message as a text string stored in a string list ('STR#') resource.

Figure 3-37 Structure of an 'hrct' component compiled with the HMStringResItem identifier

If you examine a compiled version of an 'hrct' resource, you find that a component identified in a Rez input file by the HMStringResItem identifier consists of the following elements:

Figure 3-38 shows the structure of a hot-rectangle component that specifies its help message in a picture ('PICT') resource, in styled text ('TEXT' and 'styl') resources, or in a string ('STR ') resource.

Figure 3-38 Structure of an 'hrct' component compiled with the HMPictItem, HMTEResItem, or HMSTRResItem identifier

If you examine a compiled version of an 'hrct' resource, you find that a component identified in a Rez input file by either the HMPictItem, HMTEResItem, or HMSTRResItem identifier consists of the following elements:

Figure 3-39 shows the structure of a hot-rectangle component that doesn't specify a help message.

Figure 3-39 Structure of an 'hrct' component compiled with the HMSkipItem identifier

If you examine a compiled version of an 'hrct' resource, you find that a component identified by the HMSkipItem identifier consists of the following elements:


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996