Important: The information in this document is obsolete and should not be used for new development.
The Help Message Record
A help message record describes a help message. The Help Manager displays a help balloon with that message when the help message record is passed in theaHelpMsg
parameter to theHMShowBalloon
function. TheHMMessageRecord
data type defines the help message record.
TYPE HMMessageRecord = RECORD hmmHelpType: Integer; {type of next field} CASE Integer OF khmmString: (hmmString: Str255); {Pascal string} khmmPict: (hmmPict: Integer); {'PICT' resource ID} khmmStringRes: (hmmStringRes: HMStringResType); {'STR#' resource ID } { and index} khmmTEHandle: (hmmTEHandle: TEHandle); {TextEdit handle} khmmPictHandle:(hmmPictHandle: PicHandle); {picture handle} khmmTERes: (hmmTERes: Integer); {'TEXT'/'styl' } { resource ID} khmmSTRRes: (hmmSTRRes: Integer) {'STR ' resource ID} END;
Field Description
hmmHelpType
- Specifies the data type of the next field of the help message record. You specify one of these constants for the
hmmHelpType
field.CONST khmmString = 1; {Pascal string} khmmPict = 2; {'PICT' resource ID} khmmStringRes = 3; {'STR#' resource ID/index} khmmTEHandle = 4; {TextEdit handle} khmmPictHandle = 5; {picture handle} khmmTERes = 6; {'TEXT'/'styl' resource ID} khmmSTRRes = 7; {'STR ' resource ID}Because the Help Manager uses the resource itself or the actual handle that you pass to
- Only one field follows the
hmmHelpType
field, but it can be one of seven different data types. The field that follows thehmmHelpType
field specifies the help message itself.hmmString
- Contains a Pascal string for a help message when you supply the
khmmString
constant in thehmmHelpType
field. (This is generally not recommended; instead, you should store the help message in a resource, which makes localization easier.)hmmPict
- Contains the resource ID of a
'PICT'
resource for a help message when you supply thekhmmPict
constant in thehmmHelpType
field.hmmStringRes
- Contains a Help Manager string list record (described in "The Help Manager String List Record" on page 3-90) when you supply the
khmmStringRes
constant in thehmmHelpType
field.hmmTEHandle
- Specifies a TextEdit handle to a help message when you supply the
khmmTEHandle
constant in thehmmHelpType
field.hmmPictHandle
- Specifies a handle to a
'PICT'
graphic containing a help message when you supply thekhmmPictHandle
constant in thehmmHelpType
field.hmmTERes
- Specifies the resource ID of both a
'TEXT'
and an'styl'
resource for a help message when you supply thekhmmTEHandle
constant in thehmmHelpType
field.hmmSTRRes
- Specifies the resource ID of an
'STR '
resource for a help message when you supply thekhmm
STRRes constant in thehmmHelpType
field.HMShowBalloon
, your'PICT'
resource should be purgeable, or, when using a handle to a'PICT'
resource, you should release the handle or dispose of it when you are finished with it.Examples of how to use a help message record are provided in "Providing Help Balloons for Dynamic Windows" on page 3-69.