Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

GetCtlColors

Returns the tab control's color attributes.

C

void SftTabs_GetCtlColors(HWND hwndCtl, LPSFTTABS_COLORS lpColors);

C++

void CSftTabs::GetCtlColors(LPSFTTABS_COLORS lpColors) const;

Parameters

hwndCtl

The window handle of the tab control.

lpColors

A pointer to a SFTTABS_COLORS structure containing the color definitions. GetCtlColors uses this structure to return the current color settings.

Comments

The GetCtlColors function returns 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 | 0x80000000L; /* 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 | 0x80000000L; /* 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.