Important: The information in this document is obsolete and should not be used for new development.
PickColor
Displays the standard color picker dialog box.
pascal OSErr PickColor (ColorPickerInfo *theColorInfo);
theColorInfo- A pointer to a color picker parameter block (page 2-20). On input, you specify information such as the location of the dialog box. On output, the parameter block specifies information such as whether the user has changed the color.
DISCUSSION
ThePickColorfunction displays the standard, modal dialog box for color pickers. Use the color picker parameter block pointed to in the parametertheColorInfoto specify information to and obtain information from the Color Picker Manager.When the user clicks the OK button, the
PickColorfunction removes the dialog box and returnstruein thenewColorChosenfield of the color picker parameter block pointed to by thetheColorInfoparameter. ThePickColorfunction also returns the user's selected color in the fieldtheColor. When the user clicks the Cancel button,PickColorremoves the dialog box and returnsfalsein thenewColorChosenfield.SEE ALSO
Listing 2-1 in Advanced Color Imaging on the Mac OS illustrates how to use thePickColorfunction. If your application needs to display color pickers in a dialog box other than the standard modal dialog box, your application must use the Color Picker Manager low-level functions, as described in "Using Customized Dialog Boxes for Color Pickers" (page 2-10) in Advanced Color Imaging on the Mac OS.