Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

AddTab

Adds a new tab to a tab control. The new tab will be added as the last tab.

C

int SftTabs_AddTab(HWND hwndCtl, LPCTSTR lpszText);
int SftTabs_AddTab_A(HWND hwndCtl, LPCWSTR lpszText);
int SftTabs_AddTab_W(HWND hwndCtl, LPCWSTR lpszText);

C++

int CSftTabs::AddTab(LPCTSTR lpszText);

Parameters

hwndCtl

The window handle of the tab control.

lpszText

Points to the null-terminated string that is to be used as text for the tab label.

Returns

The return value is the zero-based index of the newly added tab. The return value is -1 if an error occurred or if the maximum number of tabs has been reached.

Comments

The AddTab function adds a new tab to a tab control. The new tab will be added as the last tab.

The tab control creates a copy of the string supplied.

The WM_SETREDRAW Windows message can be used to suppress the tab control from being redrawn when many tabs are added.

Tabs can be deleted using DeleteTab. New tabs can be inserted at a specific location using InsertTab.

Example

C

index = SftTabs_AddTab(hwndTab, "A Test");

C++

index = m_Tab.AddTab("A Test");

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


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