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.


Item resource specification

The color picker pull-down menu item is defined in a resource file with the following structure:

typedef struct ditem_pulldowncpickermenursc
long synonymsId;
ULong helpInfo;
ULong helpSource;
long pulldownHookId;
ULong attributes;
ULong commandNumber;
ULong commandSource;
ULong mask;
#if defined (resource)
char menuTitle[];
char accessStr[];
long menuTitleLength;
char menuTitle[1];
} DItem_PulldownCPickerMenuRsc;

The DItem_PulldownCPickerMenuRsc structure has the following unique fields. (See "Common item resource fields" for a description of any field not in this table.)

Field Description
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:

attributes Value Meaning
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.

DItem_PulldownCPickerMenuRsc PULLDOWNCPICKERMENUID_ElementColor=
CMD_ACTIVE_COLOR_CSELECT, MCMD, NOMASK, "", "tcb->symbology.color"

Item hook function messages

The following messages are sent to item hook functions that are attached to color picker pull-down menus:


Color picker pull-down menu functions

There are no color picker pull-down menu functions.

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.