HMGetIndHelpMsg
HMGetIndHelpMsg Extract balloon content and get additional
information
#include <Balloons.h> Help Manager
OSErr HMGetIndHelpMsg ( whichType, whichResID, whichMsg,
whichState, options, tip, altRect, theProc,
variant, aHelpMsg, count);
ResType whichType; specifies the format of the help message
short whichResID; the resource ID of the help resource whose
content you wish to extract.
short whichMsg; specifies the index of the component you wish
to extract
short whichState; specifies the state of the item whose message
you wish to extract.
long * options; the value of the options field
Point *tip; the coordinates of the tip location
Rect *altRect; the coordinates of the alternate rectangle
short *theProc; the resource ID of its 'WDEF' resource
short *variant; the balloon definition function's variation code
HMMessageRecord * aHelpMsg; a help message record.
short * count; the number of components defined in the
resource (not counting the header information)
In addition to extracting the help balloon content specified in existing
help resources as HMExtractHelpMsg does, HMGetIndHelpMsg
returns additional information regarding the help resource, such as its
variation code, tip location, and so on.
whichType specifies the format of the help message. Supply one of these
constants: kHMMenuResType, kHMDialogResType,
kHMRectListResType, kHMOverrideResType,
kHMFinderApplResType
Note: If HMCompareItem appears as a component of an
'hmnu' resource that you're examining, neither this function
nor HMExtractHelpMsg performs a comparison against the
current name of any menu item. Instead, these functions return
the messages listed in your HMCompareItem components in the
order in which they appear in the 'hmnu' resource.
whichMsg specifies the index of the component you wish to extract. (Do not
count the header information as a component to index.) After the
header information, for example, the first component in a menu help
resource defines help for missing items; the second item defines help
for the menu title.
whichResID the resource ID of the help resource whose content you wish to
extract. Specify the index of the component you wish to extract in the
whichMsg parameter. (Do not count the header information as a
component to index.) After the header information, for example, the
first component in a menu help resource defines help for missing
items; the second item defines help for the menu title.
whichState specifies the state of the item whose message you wish to extract.
Use one of the following constants for the whichState parameter. For
the kHMRectListResType, kHMOverrideResType, and
kHMFinderApplResType resource types-which do not have
states-supply the kHMEnabledItem constant for the whichState
parameter.
options the value of the options field.
tip the coordinates of the tip location.
altRect the coordinates of the alternate rectangle.
theProc the resource ID of its 'WDEF' resource.
variant the balloon definition function's variation code
aHelpMsg a help message record . The aHelpMsg parameter is of data type
HMMessageRecord. Help Balloons in Dynamic Windows
describes the fields of this record.
count the number of components defined in the resource (not counting the
header information)
Returns: an Error Code.
noErr (0) No error
paramErr (-50) Error in parameter list
memFullErr (-108) Not enough room in heap zone
resNotFound (-192) Unable to read resource
hmSkipBalloon (-857) No balloon content to fill in
hmWrongVersion (-858) Wrong version of Help Manager resource
hmUnknownHelpType (-859) Help message record contained a bad type

Notes: To retrieve all of the help balloon messages and related information for a
given resource, set whichMsg to 1 and make repeated calls to
HMGetIndHelpMsg, incrementing whichMsg by 1 on each subsequent call
until it returns the hmSkippedBalloon result code.