Important: The information in this document is obsolete and should not be used for new development.
MyExtractHelpItem
Color picker-defined subroutine that handles akExtractHelpItemrequest.If you create a color picker, it must respond to the
kExtractHelpItemrequest 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 thekExtractHelpItemrequest 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
itemNoparameter. The following constants are used to represent the possible states:kHMEnabledItem,kHMDisabledItem,kHMCheckedItem, andkHMOtherItem.helpInfo- A pointer to a
HelpItemInfostructure (page 2-32). In thehelpMessagefield of this structure, the Color Picker Manager passes the default help message in anHMHelpMessagestructure; yourMyExtractHelpItemfunction changes the help message by supplying a differentHMHelpMessagestructure (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 theoptionselement of its help resource, its tip location, its alternate rectangle, its tip function, and its variation code--in the rest of the fields of theHelpItemInfostructure, which yourMyExtractHelpItemfunction can also change.DISCUSSION
YourMyExtractHelpItemfunction should return information about your color picker's help balloons. If your color picker has no help balloons, it should return thenoHelpForItemresult code, and the Help Manager will display the default message and characteristics of the help balloon.