Overriding Help Balloons for Application Icons
Overriding Help Balloons for Application Icons
The Finder displays a default help balloon for application icons. By
specifying an 'hfdr' resource in your application's resource fork, you
can provide your own help balloon for the Finder to display when the
user moves the cursor over your application icon.
Note: You cannot override the default help balloon that the Finder
uses for document icons.
Shown here is the general format of an 'hfdr' resource.
Finder icon help
Component resource element
Header Help Manager version
Options
Balloon definition function
Variation code
Icon help Identifier for help balloon content
Balloon content for application icon
Use resource ID -5696 for your 'hfdr' resource. If an 'hfdr' resource
with that ID exists for an application, the Help Manager uses it
instead of the default help balloon provided by the Finder.
As with the other help resources, specify the HelpMgrVersion
constant in the first field of the header component of the 'hfdr'
resource. In the options field, specify a constant (normally,
hmDefaultOptions) or the sum of several constants' values from this
list. (Specifying Options in Help Resources describes these
options.)
Specify the balloon definition function and variation code (both
typically 0) in the third and fourth fields of the header. (These are
described in detail in Providing Help Balloons for Menus.)
In the icon help component of this resource, specify the format that
the help content takes. As with the other help resources, specify the
format using one of these identifiers:
Identifier Help content format
HMStringItem Pascal string within the help resource
HMPictItem 'PICT' resource
HMStringResItem 'STR#' resource
HMTEResItem 'TEXT' and 'styl' resources
HMSTRResItem 'STR ' resource
HMSkipItem No content-skip this item
If you specify HMSkipItem, no help balloon appears.
Default and customized help balloons for an application icon
The default help balloon for application icons is shown on the left in
the Figure above. A customized help balloon for the same icon appears
on the right in the Figure above. The customized help balloon is
supplied with the resources shown in the Listing below.
Creating a help balloonfl resource for an application icon
resource 'hfdr' (-5696) { // help balloon for SurfWriter app
// icon
HelpMgrVersion, hmDefaultOptions, 0, 0, // header information
{
HMSTRResItem { // use 'STR ' resource 1001
1001
}
}
};
resource 'STR ' (1001) { // help message for SurfWriter app
// icon
"Use the SurfWriter word processor to create or edit the most
"radical documents ever written on your Macintosh computer.
};