Important: The information in this document is obsolete and should not be used for new development.
MyExtractHelpItem
Color picker-defined subroutine that handles akExtractHelpItem
request.If you create a color picker, it must respond to the
kExtractHelpItem
request code. The Color Picker Manager sends this code to obtain help messages or other help balloon characteristics from your color picker. A color picker responds to thekExtractHelpItem
request code by calling a color picker-defined subroutine (for example,MyExtractHelpItem
) to handle the request.
pascal ComponentResult MyExtractHelpItem ( PickerStorageHndl storage, short itemNo, short whichState, HelpItemInfo *helpInfo);
storage
- A handle to your color picker's global data.
itemNo
- A number corresponding to the position of an item in the item list resource of the color picker's dialog box. The Help Manager is ready to display a help balloon for the item represented by this number.
whichState
- For menu items and items in alert or dialog boxes, the state of the item specified in the
itemNo
parameter. The following constants are used to represent the possible states:kHMEnabledItem
,kHMDisabledItem
,kHMCheckedItem
, andkHMOtherItem
.helpInfo
- A pointer to a
HelpItemInfo
structure (page 2-32). In thehelpMessage
field of this structure, the Color Picker Manager passes the default help message in anHMHelpMessage
structure; yourMyExtractHelpItem
function changes the help message by supplying a differentHMHelpMessage
structure (described in the chapter "Help Manager" in Inside Macintosh: More Macintosh Toolbox) for this field. The Color Picker Manager passes the default characteristics of the help balloon--that is, the value of theoptions
element of its help resource, its tip location, its alternate rectangle, its tip function, and its variation code--in the rest of the fields of theHelpItemInfo
structure, which yourMyExtractHelpItem
function can also change.DISCUSSION
YourMyExtractHelpItem
function should return information about your color picker's help balloons. If your color picker has no help balloons, it should return thenoHelpForItem
result code, and the Help Manager will display the default message and characteristics of the help balloon.