Important: The information in this document is obsolete and should not be used for new development.
SetPickerColor
Sets the original or the new color for a color picker.
pascal OSErr SetPickerColor ( picker thePicker, ColorType whichColor, PMColor *color);
thePicker
- The color picker for which to set a color.
whichColor
- Either of two values:
kOriginalColor
orkNewColor
.color
- A pointer to a
PMColor
structure (page 2-15) specifying the color to set.DISCUSSION
TheSetPickerColor
function sets the color picker specified by the parameterthePicker
to use the color specified in thecolor
parameter. If your application passeskOriginalColor
in thewhichColor
parameter, thenSetPickerColor
sets this color as the original color to be edited. If your application passeskNewColor
, thenSetPickerColor
sets the color to be used as if it were the last color selected by the user.Use the
SetPickerColor
function for setting colors for color pickers in custom dialog boxes. When your application uses thePickColor
function to display the standard dialog box, your application supplies the original color in the fieldtheColor
of the color picker parameter block. This color is used as the new color until the user begins editing the color.SEE ALSO
Listing 2-7 (page 2-16) in Advanced Color Imaging on the Mac OS illustrates how to use theSetPickerColor
function.