The SFTBOX_COLORS structure is used with GetCtlColors and SetCtlColors to retrieve and set a combo box control's color attributes.
typedef struct tagSftBoxComboBoxColors {
COLORREF colorBg; // background color
COLORREF colorFg; // foreground color
COLORREF colorFgGrayed; // grayed text foreground color
COLORREF colorOddBg; // odd item background color
COLORREF colorOddFg; // odd item foreground color
COLORREF colorSelBg; // selection background color
COLORREF colorSelFg; // selection foreground color
COLORREF colorDarkEdge; // 3D dark edge
COLORREF colorLightEdge; // 3D light edge
COLORREF colorColHdrBg; // column header background color
COLORREF colorColHdrFg; // column header foreground color
COLORREF colorColHdrFgGrayed; // column header grayed text color
COLORREF colorColHdrDarkEdge; // column header 3D dark edge
COLORREF colorColHdrLightEdge; // column header 3D light edge
COLORREF colorRowHdrBg; // row header background color
COLORREF colorRowHdrFg; // row header foreground color
COLORREF colorRowHdrSelBg; // row header selected background color
COLORREF colorRowHdrSelFg; // row header selected foreground color
COLORREF colorRowHdrFgGrayed; // row header grayed text color
COLORREF colorRowHdrDarkEdge; // row header 3D dark edge
COLORREF colorRowHdrLightEdge; // row header 3D light edge
COLORREF colorRowColHdrBg; // row/column header background color
COLORREF colorRowColHdrFg; // row/column header foreground color
COLORREF colorRowColHdrFgGrayed; // row/column header grayed text color
COLORREF colorRowColHdrDarkEdge; // row/column header 3D dark edge
COLORREF colorRowColHdrLightEdge; // row/column header 3D light edge
COLORREF colorDropDownBg; // dropdown button background color
COLORREF colorDropDownFg; // dropdown button foreground color
COLORREF colorDropDownFgGrayed; // dropdown button foreground color, grayed
COLORREF colorDropDownLightEdge; // dropdown button light edge
COLORREF colorDropDownDarkEdge; // dropdown button dark edge
COLORREF colorDropDownBlackEdge; // dropdown button black edge
COLORREF colorDropDownWhiteEdge; // dropdown button white edge
COLORREF colorGridVert; // vertical gridline color
COLORREF colorGridHorz; // horizontal gridline color
COLORREF colorTreeLines; // tree line color
COLORREF colorTreeLinesGrayed; // tree line color (disabled control)
COLORREF colorEditBg; // edit control background
COLORREF colorEditFg; // edit control foreground
COLORREF colorDropHighlight; // drop highlight color
COLORREF colorToolTipBg; // tooltip background color
COLORREF colorToolTipFg; // tooltip foreground color
COLORREF colorSelBgNoFocus; // selection background color - nofocus
COLORREF colorSelFgNoFocus; // selection foreground color - nofocus
COLORREF selectionOutlineBorder; // selection outline colors
COLORREF selectionInnerBorder;
COLORREF selectionInnerFill1;
COLORREF selectionInnerFill2;
COLORREF selectionFlybyOutlineBorder; // selection outline colors (flyby highlighting)
COLORREF selectionFlybyInnerBorder;
COLORREF selectionFlybyInnerFill1;
COLORREF selectionFlybyInnerFill2;
COLORREF nofocusOutlineBorder; // selection outline colors when control doesn't have the input focus
COLORREF nofocusInnerBorder;
COLORREF nofocusInnerFill1;
COLORREF nofocusInnerFill2;
COLORREF flybyOutlineBorder; // flyby highlighting outline colors
COLORREF flybyInnerBorder;
COLORREF flybyInnerFill1;
COLORREF flybyInnerFill2;
COLORREF droptargetOutlineBorder; // drop target outline colors
COLORREF droptargetInnerBorder;
COLORREF droptargetInnerFill1;
COLORREF droptargetInnerFill2;
SFTBOX_DWORD_PTR res1, res2, res3, res4, res5, res6; // reserved
SFTBOX_DWORD_PTR res11, res12; // reserved
} SFTBOX_COLORS, * LPSFTBOX_COLORS;
typedef const SFTBOX_COLORS * LPCSFTBOX_COLORS;The default background color used to draw items that are not selected, in the dropdown portion and in the static portion of a dropdown list combo box. Columns can override the default background color using SetColumns. Cells can override the default background color using SetCellInfo. If a selected item uses a selection style (see SetSelectionStyle) that uses the colorSelBg value for only portions of the item, the color colorBg is used for the remainder of the item. The edit control portion of a simple combo box or dropdown combo box uses colorEditBg instead.
The default foreground color used to draw items that are not selected. Columns can override the default foreground color using SetColumns. Cells can override the default foreground color using SetCellInfo. If an item is disabled (see SetItemStatus), the colorFgGrayed value is used instead of colorFg. If a selected item uses a selection style (see SetSelectionStyle) that uses the colorSelFg value for only portions of the item, the color colorFg is used for the remainder of the item.
The default foreground color used to draw items that are disabled. While the combo box control is disabled (see EnableWindow), all items in the static portion and, in a simple combo box, in the dropdown portion are drawn using this color.
The background color used to draw items in odd numbered rows that are not selected. Cells can override the background color using SetCellInfo. Specify SFTBOX_NOCOLOR to use the default background color colorBg.
The foreground color used to draw items in odd numbered rows that are not selected. Cells can override the foreground color using SetCellInfo. Specify SFTBOX_NOCOLOR to use the default foreground color colorFg.
The default background color used to draw the selected item. Columns can override the default background color using SetColumns. Cells can override the background color using SetCellInfo. If the selected item uses a selection style (see SetSelectionStyle) that uses the colorSelBg value for only portions of the item, the color colorBg is used for the remainder of the item.
The default foreground color used to draw the selected item. Columns can override the default foreground color using SetColumns. Cells can override the foreground color using SetCellInfo. If the selected item uses a selection style (see SetSelectionStyle) that uses the colorSelFg value for only portions of the item, the colorFg value is used for the remainder of the item.
The color used to draw the shadow edge of items when items are displayed in a 3D fashion (see SetShow3D).
The color used to draw the highlighted edge of items when items are displayed in a 3D fashion (see SetShow3D).
The default background color for column headers. Individual column headers can override the color using SFTBOX_COLUMN, headerColorBg.
The default foreground color for column headers. Individual column headers can override the color using SFTBOX_COLUMN, headerColorFg.
The foreground color used to draw disabled column headers. SetColumns is used to enable and disable individual column headers. Individual column headers can override the color using SFTBOX_COLUMN, headerColorFgDisabled.
The color used to draw the dark edge of the column headers. All column headers use the same shadow color.
The color used to draw the highlighted edge of the column headers. All column headers use the same highlight color.
The default background color used to draw row headers of items that are not selected. Items can override the row header background color using SetRowInfo.
The default foreground color used to draw row headers of items that are not selected. Items can override the row header foreground color using SetRowInfo.
The default background color used to draw the row header of the selected item. Items can override the row header's background color using SetRowInfo.
The default foreground color used to draw the row header of the selected item. Items can override the row header's foreground color using SetRowInfo.
The default foreground color used to draw an item's row header that is disabled.
The color used to draw the dark edge of row headers. All row headers use the same shadow color.
The color used to draw the highlighted edge of row headers. All row headers use the same highlight color.
The row/column header's background color. When Windows themes are used, the row/column header is drawn using the theme unless the fHeaderColorsOverrideTheme member of the SFTBOX_CONTROL structure is TRUE (see SetControlInfo).
The row/column header's foreground color.
The foreground color used to draw a disabled row/column header.
The color used to draw the dark edge of the row/column header.
The color used to draw the highlighted edge of the row/column header.
The background color of the dropdown button. Specify SFTBOX_NOCOLOR to use the system color COLOR_BTNFACE. The default is SFTBOX_NOCOLOR.
The color used to draw the arrow of the dropdown button. The default is the system color COLOR_BTNTEXT.
The color used to draw the arrow of the dropdown button when the combo box control is disabled or does not contain any items. The default is the system color COLOR_GRAYTEXT.
The color used to draw the light portion of the three-dimensional edge of the dropdown button. The default is the system color COLOR_3DLIGHT.
The color used to draw the dark portion of the three-dimensional edge of the dropdown button. The default is the system color COLOR_BTNSHADOW.
The color used to draw the darkest portion of the three-dimensional edge of the dropdown button. The default is the system color COLOR_3DDKSHADOW.
The color used to draw the lightest portion of the three-dimensional edge of the dropdown button. The default is the system color COLOR_3DHILIGHT.
The color used to draw vertical grid lines. If colorGridVert is set to SFTBOX_NOCOLOR, a suitable default color is used based on the current Windows theme.
The color used to draw horizontal grid lines. If colorGridHorz is set to SFTBOX_NOCOLOR, a suitable default color is used based on the current Windows theme.
The color used to draw connecting tree lines.
The color used to draw connecting tree lines while the combo box control is disabled (see EnableWindow). Tree lines of disabled items (see SetItemStatus) in an enabled combo box control are drawn using colorTreeLines.
The background color of the edit control portion of a simple combo box or dropdown combo box. Specify SFTBOX_NOCOLOR to use the color colorBg. The default is the system color COLOR_WINDOW. A disabled or read-only edit control portion (see SetReadOnly) is drawn using system colors.
The text color of the edit control portion of a simple combo box or dropdown combo box. Specify SFTBOX_NOCOLOR to use the color colorFg. The default is the system color COLOR_WINDOWTEXT.
The color used to display the drop target item of a drag & drop operation. The drop target is displayed using colorDropHighlight based on the values specified using SetDropHighlightStyle and SetDropHighlight.
The background color used to draw a ToolTip or ScrollTip. Specify SFTBOX_NOCOLOR to use the default background color. For cell ToolTips, the default is the background color of the cell or column. For ScrollTips, the default is the system color COLOR_INFOBK.
The foreground color used to draw a ToolTip or ScrollTip. Specify SFTBOX_NOCOLOR to use the default foreground color. For cell ToolTips, the default is the foreground color of the cell or column. For ScrollTips, the default is the system color COLOR_INFOTEXT.
The background color used to draw the selected item when the combo box control does not have the input focus. If the combo box control has the input focus, the color colorSelBg is used instead. This color value is only used if SetNoFocusStyle(SFTBOX_NOFOCUS_KEEPSEL) is used. In the dropdown portion of a dropdown combo box or dropdown list combo box, the selected item is always drawn using colorSelBg.
The foreground color used to draw the selected item when the combo box control does not have the input focus. If the combo box control has the input focus, the color colorSelFg is used instead. This color value is only used if SetNoFocusStyle(SFTBOX_NOFOCUS_KEEPSEL) is used. In the dropdown portion of a dropdown combo box or dropdown list combo box, the selected item is always drawn using colorSelFg.
The outermost border color used to render the rounded selection outline rectangle of the selected item. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The inner border color used to render the rounded selection outline rectangle of the selected item. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The starting color (top) used to gradient fill the inside of the rounded selection outline rectangle of the selected item. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The ending color (bottom) used to gradient fill the inside of the rounded selection outline rectangle of the selected item. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The outermost border color used to render the rounded selection outline rectangle of the selected item when it is highlighted due to flyby highlighting (see SetFlybyHighlight). This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The inner border color used to render the rounded selection outline rectangle of the selected item when it is highlighted due to flyby highlighting. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The starting color (top) used to gradient fill the rounded selection outline rectangle of the selected item when it is highlighted due to flyby highlighting. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The ending color (bottom) used to gradient fill the rounded selection outline rectangle of the selected item when it is highlighted due to flyby highlighting. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The outermost border color used to render the rounded selection outline rectangle of the selected item, when the combo box control does not have the input focus. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTBOX_NOFOCUS_KEEPSEL) is used. In the dropdown portion, selectionOutlineBorder is always used instead.
The inner border color used to render the rounded selection outline rectangle of the selected item, when the combo box control does not have the input focus. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTBOX_NOFOCUS_KEEPSEL) is used. In the dropdown portion, selectionInnerBorder is always used instead.
The starting color (top) used to gradient fill the inside of the rounded selection outline rectangle of the selected item, when the combo box control does not have the input focus. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTBOX_NOFOCUS_KEEPSEL) is used. In the dropdown portion, selectionInnerFill1 is always used instead.
The ending color (bottom) used to gradient fill the inside of the rounded selection outline rectangle of the selected item, when the combo box control does not have the input focus. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTBOX_NOFOCUS_KEEPSEL) is used. In the dropdown portion, selectionInnerFill2 is always used instead.
The outermost border color used to render the rounded selection outline rectangle of an item that is highlighted due to flyby highlighting (see SetFlybyHighlight). This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The inner border color used to render the rounded selection outline rectangle of an item that is highlighted due to flyby highlighting. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The starting color (top) used to gradient fill the rounded selection outline rectangle of an item that is highlighted due to flyby highlighting. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The ending color (bottom) used to gradient fill the rounded selection outline rectangle of an item that is highlighted due to flyby highlighting. This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The outermost border color used to render the rounded selection outline rectangle of an item that is the current drop target item (see SetDropHighlight). This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The inner border color used to render the rounded selection outline rectangle of an item that is the current drop target item (see SetDropHighlight). This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The starting color (top) used to gradient fill the rounded selection outline rectangle of an item that is the current drop target item (see SetDropHighlight). This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
The ending color (bottom) used to gradient fill the rounded selection outline rectangle of an item that is the current drop target item (see SetDropHighlight). This color setting only takes effect if a rounded selection outline rectangle is used (see SFTBOX_SELECTION_OUTLINE).
res1, res2, res3, res4, res5, res6, res11, res12
Reserved. h1 Comments
The SFTBOX_COLORS structure is used with GetCtlColors and SetCtlColors to retrieve and set a combo box control's color attributes. To modify colors, an application retrieves the current colors using GetCtlColors, modifies the desired members and calls SetCtlColors.
An RGB value or a GetSysColor index value can be specified for all color values. If a color index is used, the high-order bit must be set (e.g., COLOR_WINDOW | 0x80000000L).
The dropdown button colors (colorDropDownBg, colorDropDownFg, colorDropDownFgGrayed, colorDropDownLightEdge, colorDropDownDarkEdge, colorDropDownBlackEdge and colorDropDownWhiteEdge) are used when the dropdown button is drawn using the classic dropdown button style (see SetDropDownButtonStyle, SFTBOX_DDBUTTON_CLASSIC) and when a dropdown button picture (see SetDropDownButtonPicture) is shown, except with the default style SFTBOX_DDBUTTON_DEFAULT while Windows themes are used. With the styles SFTBOX_DDBUTTON_BUTTONHOVER and SFTBOX_DDBUTTON_BUTTONHOVERNT, only colorDropDownFg is used, for the arrow shown when no dropdown button picture is defined. Otherwise the dropdown button is drawn by Windows and these colors are not used.
Many color settings have no effect when Windows themes are used. While high contrast is active (see SetHighContrastMode), colors set by the application are ignored and system colors are used.
Pointer typedefs: LPSFTBOX_COLORS is a pointer to a SFTBOX_COLORS structure, LPCSFTBOX_COLORS is a pointer to a constant SFTBOX_COLORS structure.
See Also C/C++ API | Categories | Notifications