The color chooser item may be placed on a dialog box with a specified width and height allowing the user to select one color form a palette of choices.
The DialogItemRsc field extent specifies the location, width and height of the color chooser.
The type field should be ColorChooser.
The ID determines the DItem_ColorChooserRsc instance to load.
The attributes field can be ON or OFF and optionally combined with HIDDEN. It will usually be ON.
The itemArg field is unused and should usually be set to 0.
The label field can override the label contained in the DItem_ColorChooserRsc instance.
The following is an example of a color chooser item list specification:
The color chooser item is defined in a resource file with the following structure:
The DItem_ColorChooserRsc structure has the following unique fields. See CommonItemResourceFields for a description of any field not shown in this table.
Field | Description |
---|---|
accessStr | For a color chooser, accessStr specifies a variable used to determine the current color index. |
The following is an example of a color chooser item resource:
The following messages are sent to item hook functions that are attached to color chooser items:
DITEM_MESSAGE_CREATE DITEM_MESSAGE_INIT DITEM_MESSAGE_DESTROY DITEM_MESSAGE_BUTTON DITEM_MESSAGE_SYNCHRONIZE DITEM_MESSAGE_GETSTATE DITEM_MESSAGE_SETSTATE DITEM_MESSAGE_STATECHANGED DITEM_MESSAGE_QUEUECOMMAND
Function | Description |
---|---|
mdlDialog_colorPickerSetColorTable | sets the color table for the color chooser item. It is applicable to both the ColorPicker and the ColorChooser dialog items. |