The color picker pull-down menu acts in a similar manner to the standard color picker item that is placed in the content area of dialog boxes. It selects a current color index. The color picker pull-down menu cannot have submenus.
The color picker pull-down menu item is defined in a resource file with the following structure:
The DItem_PulldownCPickerMenuRsc structure has the following unique fields. (See "Common item resource fields" for a description of any field not in this table.)
|attributes||Specifies the attributes of the color picker pull-down menu. It will normally be ON | ALIGN_LEFT and is constructed by combining the constants from the attributes table (below) with the logical OR operator.|
|mask||Indicates which bits of the variable specified by accessStr are used to determine the current color index. Usually, mask should be set to NOMASK (defined to be 0xFFFFFFFF), which indicates that the entire variable will be used to determine the index.|
|menuTitle||Contains the title of the menu. This field should be set to "" if the color picker pull-down menu is a submenu. (In this case, its title cannot display). |
Put a `~' before the character in the title that will be the mnemonic. The mnemonic is the key the user presses to display the menu when navigating the menu bar with the keyboard.
The following table lists possible values for the attributes field (described above) and the meaning of those values:
|ON||The color picker pull-down menu will be initially enabled.|
|OFF||All subitems in the color picker pull-down menu will be disabled (unselectable). The title of the menu will also be dimmed (if the pull-down menu is not a submenu).|
|ALIGN_LEFT||This is the default setting and should always be set. The pull-down menu will be aligned on the left side of the menu bar.|
The following is an example of a color picker pull-down menu resource. This item is the MicroStation Command window Element Color submenu, and is defined in MicroStation's resource file.
The following messages are sent to item hook functions that are attached to color picker pull-down menus:
DITEM_MESSAGE_CREATE DITEM_MESSAGE_DESTROY DITEM_MESSAGE_BUTTON DITEM_MESSAGE_GETSTATE DITEM_MESSAGE_SETSTATE DITEM_MESSAGE_STATECHANGED DITEM_MESSAGE_QUEUECOMMAND
There are no color picker pull-down menu functions.