Important: The information in this document is obsolete and should not be used for new development.
GetPickerColor
Returns the original or the new color from a color picker.
pascal OSErr GetPickerColor ( picker thePicker, ColorType whichColor, PMColor *color);
thePicker
- The color picker from which to obtain a color.
whichColor
- Either of two values:
kOriginalColor
orkNewColor
.color
- A pointer to a
PMColor
structure (page 2-15). On output, the original or the new color from the picker (as specified by thewhichColor
parameter).DISCUSSION
In thePMColor
structure pointed to by thecolor
parameter, theGetPickerColor
function returns a color from the color picker specified by the parameterthePicker
. If your application passeskOriginalColor
in thewhichColor
parameter, thenGetPickerColor
returns the color that the user began editing. If your application passeskNewColor
, thenGetPickerColor
returns the new color selected by the user.Use the
GetPickerColor
function for getting colors from color pickers in custom dialog boxes. When your application uses thePickColor
function to display the standard dialog box, and the user clicks the OK button, the Color Picker Manager returns the new color in the fieldtheColor
of the color picker parameter block.SEE ALSO
Listing 2-8 (page 2-17) in Advanced Color Imaging on the Mac OS illustrates how to use theGetPickerColor
function.