Overriding Other Default Help Balloons
Overriding Other Default Help Balloons
In addition to help balloons for application and document icons, the
Help Manager provides default help balloons for the title bar and
the close and zoom boxes of an active window. It also provides default
help balloons for windows of inactive applications, inactive windows of
an active application, and the area outside of a modal dialog box.
Apple has re searched and tested these help messages to ensure that
they are as effective as possible for users. Normally, you should not
need to override them. However, you can override one or more of these
defaults if you feel you absolutely must by creating a resource of type
'hovr'. Shown here is the format for the 'hovr' resource.
Using an 'hovr' resource sets the default help balloons for your
application only. It does not affect the default help balloons used by
other applications.
Default help
Component override resource element
Header Help Manager version (use
HelpMgrVersion constant)
Options
Balloon definition function
Variation code
Missing items help Identifier for help balloon content
Balloon content for items missing i
from this resource or lacking b
balloon content
Title bar help Identifier for help balloon content
Balloon content for title bar of a
active window
Reserved Always use HMSkipItem identifier
here
Reserved; skip this item
Close box help Identifier for help balloon content
Balloon content for close box of a
active window
Zoom box help Identifier for help balloon content
Balloon content for zoom box of a
active window
Help for active application's Identifier for help balloon content
inactive windows Balloon content for inactive
window of active application
Help for inactive application's Identifier for help balloon content
windows Balloon content for window of
inactive application
Help for area outside of a Identifier for help balloon content
modal dialog box or alert box Balloon content for area outside of a
modal dialog box
As with the other help resources, specify the HelpMgrVersion
constant in the first field of the header component of the 'hrct'
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, Providing Help Balloons for Menus.)
For each element, 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 r
resource
HMPictItem 'PICT' resource
HMStringResItem 'STR#' resource
HMTEResItem 'TEXT' and 'styl' resources
HMSTRResItem 'STR ' resource
HMSkipItem No content-skip this item
Supply an identifier and help balloon content for the missing items
component. The Help Manager expects the components of an 'hovr'
resource to be listed in the order previously shown. To use any of the
default help balloons, specify HMSkipItem in the corresponding field of
the 'hovr' resource. The Help Manager supplies help balloons with
the missing items' balloon content for components you leave off the
bottom of this list. The Help Manager also uses the missing items'
balloon content if you provide an identifier for a component but specify
an empty string or a resource ID of 0 for that item's balloon content.
The following code example shows a resource of type 'hovr' that
overrides all of the default help balloons.
Listing Overriding default help balloons
resource 'hovr' (1000) {
HelpMgrVersion,
hmDefaultOptions, [TOKEN:12079] options
0, // the balloon definition ID
0, // variation code
HMStringItem { // missing items in case this res is short items
"Missing override message
},
{
HMSkipItem { // title bar help
// HMSkipItem means use default help balloon for this element
},
HMSkipItem { // reserved; always specify HMSkipItem here
},
HMStringItem { // close box help
"" // empty string means use missing items help
},
HMStringItem { // zoom box help
"Get this message if in Zoom In or Zoom Out box.
},
HMStringItem { // help for active app's inactive window
"Get this message if in inactive window of active application.
},
HMStringItem {// help for inactive app's window
"Get this message if in window of inactive application.
},
HMStringItem { // outside of modal dialog help
"Get this message if outside modal dialog box.
}
}
};