Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

SFTTABS_COLORS Structure

The SFTTABS_COLORS structure is used with GetCtlColors and SetCtlColors to retrieve and set a tab control's color attributes.

typedef struct tagTabsColors {
    COLORREF colorBg;     /* background color */
    COLORREF colorFg;     /* foreground color */
    COLORREF color1;      /* usually used for black border */
    COLORREF color2;      /* usually used for shadow lines */
    COLORREF color3;      /* usually used for highlight lines */
    COLORREF color4;      /* usually used for somewhat highlight'ed lines */
    COLORREF btnFace, btnShadow, btnHighlight, btnText, btnGrayText, btnBorder; /* Button colors */
    COLORREF res7, res8, res9, res10;    /* reserved */
    COLORREF res11, res12;
    COLORREF res13, res14, res15, res16;
} SFTTABS_COLORS, * LPSFTTABS_COLORS;

typedef const SFTTABS_COLORS * LPCSFTTABS_COLORS;

Members

colorBg

The default background color used for the tab control. Tabs can override the default background color using SFTTABS_TAB colorBg or colorBgSel. When using themes, this color value is ignored.

colorFg

The default foreground color used to draw tab label text. Tabs can override the default foreground color using SFTTABS_TAB colorFg or colorFgSel. When using themes, this color value is ignored.

color1

The color used to draw the lines indicating the tab control border, preferably the darkest color available. When using themes, this color value is ignored.

color2

The color used to draw the lines away from the light source, indicating a shadow, preferably a dark color. When using themes, this color value is ignored.

color3

The color used to draw the lines directly exposed to the light source, indicating a highlight, preferably a bright color. When using themes, this color value is ignored.

color4

The color used to draw the lines somewhat exposed to the light source, preferably a bright color, but of lesser intensity than color3. This color value is not used by all tab styles. When using themes, this color value is ignored.

btnFace

The color used to fill the inside of the scroll buttons. When using themes, this color value is ignored.

btnShadow

The scroll button color used to draw the lines away from the light source, indicating a shadow, preferably a dark color. When using themes, this color value is ignored.

btnHighlight

The scroll button color used to draw the lines directly exposed to the light source, indicating a highlight, preferably a bright color. When using themes, this color value is ignored.

btnText

Reserved. Initialize to SFTTABS_NOCOLOR. When using themes, this color value is ignored.

btnGrayText

Reserved. Initialize to SFTTABS_NOCOLOR.

btnBorder

The scroll button color used to draw the lines indicating the button border, preferably the darkest color available. When using themes, this color value is ignored.

res7 - res16

Reserved. Not Used.

Comments

The SFTTABS_COLORS structure is used with GetCtlColors and SetCtlColors to retrieve and set a tab control's color attributes.

Not all color values are used by all the tab styles. Some tab styles do not honor color1 - color4 settings. To determine support for a particular color setting, use the SftTabs/DLL Wizard application.

If SFTTABS_NOCOLOR is specified for any of the color values, the default color (usually derived from Control Panel settings) is used.

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).

Example

This example changes the tab control's foreground and background colors.

C

SFTTABS_COLORS Colors;
SftTabs_GetCtlColors(hwndTab, &Colors); /* Get current color settings */
Colors.colorBg = COLOR_WINDOW | 0x80000000L; /* Background color */
Colors.colorFg = RGB(0,0,128); /* Foreground color */
SftTab_SetCtlColors(hwndTab, &Colors); /* Set new colors */

C++

SFTTABS_COLORS Colors;
m_Tab.GetCtlColors(&Colors); /* Get current color settings */
Colors.colorBg = COLOR_WINDOW | 0x80000000L; /* Background color */
Colors.colorFg = RGB(0,0,128); /* Foreground color */
m_Tab.SetCtlColors(&Colors); /* Set new colors */

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.