Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

SetCtlColors

Sets the tab control's color attributes.

C

void SftTabs_SetCtlColors(HWND hwndCtl, LPCSFTTABS_COLORS lpColors);

C++

void CSftTabs::SetCtlColors(LPCSFTTABS_COLORS lpColors);

Parameters

hwndCtl

The window handle of the tab control.

lpColors

A pointer to a SFTTABS_COLORS structure containing the color definitions.

Comments

The SetCtlColors function sets the tab control's color attributes.

Using GetCtlColors and SetCtlColors is the preferred method to change color attributes. Although a tab control generates WM_CTLCOLORSTATIC messages, the WM_CTLCOLORSTATIC message handling is provided for compatibility with SftTabs 2.0 only.

When using Windows themes, the colors are determined by the defined theme and defined colors are ignored.

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 | 0x800000000L; /* Background color */ 
Colors.colorFg = RGB(0,0,128); /* Foreground color */ 
SftTabs_SetCtlColors(hwndTab, &Colors); /* Set new colors */ 

C++

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

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


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