SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
The SFTTREE_COLORS structure is used with GetCtlColors and SetCtlColors to retrieve and set a tree control's color attributes.
typedef struct tagSftTreeTreeColors { COLORREF colorBg; // background color COLORREF colorFg; // foreground color COLORREF colorFgGrayed; // grayed text 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 colorGridVert; // vertical gridline color COLORREF colorGridHorz; // horizontal gridline color COLORREF colorDropHighlight; // drop highlight color COLORREF colorTreeLines; // tree line color COLORREF colorTreeLinesGrayed; // tree line color (disabled control) COLORREF colorOddBg; // background color in odd rows COLORREF colorOddFg; // foreground color in even rows 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 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; COLORREF colorColFtrBg; // column footer background color COLORREF colorColFtrFg; // column footer foreground color COLORREF colorColFtrFgGrayed; // column footer grayed text color COLORREF colorColFtrDarkEdge; // column footer 3D dark edge COLORREF colorColFtrLightEdge; // column footer 3D light edge COLORREF colorRowColFtrBg; // row/column footer background color COLORREF colorRowColFtrFg; // row/column footer foreground color COLORREF colorRowColFtrFgGrayed; // row/column footer grayed text color COLORREF colorRowColFtrDarkEdge; // row/column footer 3D dark edge COLORREF colorRowColFtrLightEdge; // row/column footer 3D light edge COLORREF colorEdgeVertical; // vertical edge around headers, footers COLORREF colorEdgeHorizontal; // horizontal edge around row headers, row and column headers COLORREF colorSortIndicator; // sort indicator color (non-themed only) } SFTTREE_COLORS, * LPSFTTREE_COLORS; typedef const SFTTREE_COLORS * LPCSFTTREE_COLORS;
The default background color used to draw items that are not selected. 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 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. Cells can override the foreground color for disabled items using SetCellInfo.
The default background color used to draw items (rows) that are selected. Columns can override the default background color using SetColumns. Cells can override the 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 default foreground color used to draw items that are selected. Columns can override the default foreground color using SetColumns. Cells can override the foreground color using SetCellInfo. If an item is disabled (see SetItemStatus), the colorFgGrayed value is used instead of the colorSelFg value. If a 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 SFTTREE_COLUMN_EX, headerColorBg.
The default foreground color for column headers. Individual column headers can override the color using SFTTREE_COLUMN_EX, 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 SFTTREE_COLUMN_EX, headerColorFgDisabled.
The color used to draw the dark edge of the column header. All column headers use the same shadow color and cannot be defined individually.
The color used to draw the highlighted edge of the column headers. All column headers use the same highlight color and cannot be defined individually.
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 an item's row header that is selected. Items can override the row header's background color using SetRowInfo.
The default foreground color used to draw an item's row header that is selected. 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. Items can override the row header's foreground color using SetRowInfo.
The color used to draw the dark edge of row headers. All row headers use the same shadow color and cannot be defined individually.
The color used to draw the highlighted edge of row headers. All row headers use the same highlight color and cannot be defined individually.
The row/column header's background color.
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 color used to draw vertical grid lines. If colorGridVert is set to SFTTREE_NOCOLOR, a suitable default color is used based on the operating system and current Windows theme used.
The color used to draw horizontal grid lines. If colorGridHorz is set to SFTTREE_NOCOLOR, a suitable default color is used based on the operating system and current Windows theme used.
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 color used to draw connecting tree lines.
The color used to draw connecting tree lines when an item (see SetItemStatus) or the control is disabled (see EnableWindow).
The background color used to draw items in odd numbered rows that are not selected. Cells can override the background color using SetCellInfo. Specify SFTTREE_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 SFTTREE_NOCOLOR to use the default foreground color colorFg.
The background color used to draw a ToolTip or ScrollTip. Specify SFTTREE_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 defined using Control Panel (see GetSysColor(COLOR_INFOBK)).
The foreground color used to draw a ToolTip or ScrollTip. Specify SFTTREE_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 defined using Control Panel (see GetSysColor(COLOR_INFOTEXT)).
The background color used to draw a selected item when the tree control does not have the input focus. If the tree control has the input focus, the color colorSelBg is used instead. This color value is only used if SetNoFocusStyle(SFTTREE_NOFOCUS_KEEPSEL) is used.
The foreground color used to draw a selected item when the tree control does not have the input focus. If the tree control has the input focus, the color colorSelFg is used instead. This color value is only used if SetNoFocusStyle(SFTTREE_NOFOCUS_KEEPSEL) is used.
The outermost border color used to render the rounded selection outline rectangle of a selected item. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The inner border color used to render the rounded selection outline rectangle of a selected item. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The starting color (top) used to gradient fill the inside of the rounded selection outline rectangle of a selected item. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The ending color (bottom) used to gradient fill the inside of the rounded selection outline rectangle of a selected item. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The outermost border color used to render the rounded selection outline rectangle of a selected item that is highlighted due to flyby highlighting. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The inner border color used to render the rounded selection outline rectangle of a selected item that is highlighted due to flyby highlighting. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The starting color (top) used to gradient fill the rounded selection outline rectangle of a selected item that is highlighted due to flyby highlighting. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The ending color (bottom) used to gradient fill the rounded selection outline rectangle of a selected item that is highlighted due to flyby highlighting. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTTREE_NOFOCUS_KEEPSEL) is defined.
The outermost border color used to render the rounded selection outline rectangle of a selected item, when the tree control does not have the input focus. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTTREE_NOFOCUS_KEEPSEL) is defined.
The inner border color used to render the rounded selection outline rectangle of a selected item, when the tree control does not have the input focus. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTTREE_NOFOCUS_KEEPSEL) is defined.
The starting color (top) used to gradient fill the inside of the rounded selection outline rectangle of a selected item, when the tree control does not have the input focus. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTTREE_NOFOCUS_KEEPSEL) is defined.
The ending color (bottom) used to gradient fill the inside of the rounded selection outline rectangle of a selected item, when the tree control does not have the input focus. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE) and if SetNoFocusStyle(SFTTREE_NOFOCUS_KEEPSEL) is defined.
The outermost border color used to render the rounded selection outline rectangle of an item that is highlighted due to flyby highlighting. This color settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_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 settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_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 settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_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 settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_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 settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_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 settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_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 settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_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 settings only takes effect if a rounded selection outline rectangle is used (see SFTTREE_SELECTION_OUTLINE).
The default background color for column footers. Individual columns can override the color using SFTTREE_COLUMN_EX, footerColorBg.
The default foreground color for column footers. Individual columns can override the color using SFTTREE_COLUMN_EX, footerColorFg.
The foreground color used to draw disabled column footers. SetColumns is used to enable and disable individual column footers. Individual column footers can override the color using SFTTREE_COLUMN_EX, footerColorFgDisabled.
The color used to draw the dark edge of the column footers. All column footers use the same shadow color and cannot be defined individually.
The color used to draw the highlighted edge of the column footers. All column footers use the same highlight color and cannot be defined individually.
The row/column footer's background color.
The row/column footer's foreground color.
The foreground color used to draw a disabled row/column footer.
The color used to draw the dark edge of the row/column footer.
The color used to draw the highlighted edge of the row/column footer.
The color used to draw the vertical edge around column headers, column footers, row headers, row/column headers and row/column footers. Depending on whether Windows themes are used, this color may not be used.
The color used to draw the horizontal edge around column headers, column footers, row headers, row/column headers and row/column footers. Depending on whether Windows themes are used, this color may not be used.
The color used to draw the sort indicator in column headers. Depending on whether Windows themes are used, this color may not be used.
The SFTTREE_COLORS structure is used with GetCtlColors and SetCtlColors to retrieve and set a tree control's color attributes.
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).
Many color settings have no effect when Windows themes are used.
SftTree_SetRowColHeaderStyle(g_hwndTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */ Sft_InitPicture(&Pic); Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */ SftTree_SetRowColHeaderPicture(g_hwndTree, &Pic);/* Row/column picture */ SftTree_SetRowColHeaderPictureStyle(g_hwndTree, SFTTREE_BMP_RIGHT);/* Row/column picture alignment */ SftTree_SetCharSearchMode(g_hwndTree, SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Change the default colors */ { SFTTREE_COLORS Colors; SftTree_GetCtlColors(g_hwndTree, &Colors);/* Get current color settings */ Colors.colorTreeLines = COLOR_3DDKSHADOW | 0x80000000L;/* Tree line color */ Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */ Colors.colorSelFgNoFocus = COLOR_BTNTEXT | 0x80000000L;/* Selection foreground color (no input focus) */ SftTree_SetCtlColors(g_hwndTree, &Colors);/* Set new colors */ }
m_Tree.SetRowColHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */ Sft_InitPicture(&Pic); /* Initialize */ Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */ m_Tree.SetRowColHeaderPicture(&Pic); /* Row/column picture */ m_Tree.SetRowColHeaderPictureStyle(SFTTREE_BMP_RIGHT);/* Row/column picture alignment */ m_Tree.SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */ /* Change the default colors */ { SFTTREE_COLORS Colors; m_Tree.GetCtlColors(&Colors); /* Get current color settings */ Colors.colorTreeLines = COLOR_3DDKSHADOW | 0x80000000L;/* Tree line color */ Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */ Colors.colorSelFgNoFocus = COLOR_BTNTEXT | 0x80000000L;/* Selection foreground color (no input focus) */ m_Tree.SetCtlColors(&Colors); /* Set new colors */ }
See Also C/C++ API | Categories | Notifications