Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

SetTabInfo

Sets the tab attributes for the specified tab.

C

BOOL SftTabs_SetTabInfo(HWND hwndCtl, int iTab, LPCSFTTABS_TAB lpTab);

C++

BOOL CSftTabs::SetTabInfo(int iTab, LPCSFTTABS_TAB lpTab);

Parameters

hwndCtl

The window handle of the tab control.

iTab

The zero-based index of the tab for which attributes are to be defined.

lpTab

A pointer to a SFTTABS_TAB structure. This structure will be used to define the tab attributes.

Returns

The return value is TRUE if the function was successful, otherwise FALSE is returned.

Comments

The SetTabInfo function sets the tab attributes for the specified tab.

If the SFTTABS_TAB structure defines invalid tab attributes, the current tab settings remain unchanged and the function returns FALSE.

The function SftTabs_SetTabInfoEx and the LPSFTTABS_TAB_EX lpTabEx parameter of the SetTabInfo function are no longer available (see "Upgrading from Version 4.0").

Example

This example retrieves the tab attributes for the third tab and modifies the background color:

C

SFTTABS_TAB Tab;
SftTabs_GetTabInfo(hwndTab, 2, &Tab);
Tab.colorBg = RGB(255, 0, 0); 
SftTabs_SetTabInfo(hwndTab, 2, &Tab); 

C++

SFTTABS_TAB Tab;
m_Tab.GetTabInfo(2, &Tab);
Tab.colorBg = RGB(255, 0, 0); 
m_Tab.SetTabInfo(2, &Tab);

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


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