Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

InsertTab

Inserts a new tab at the specified position.

C

int SftTabs_InsertTab(HWND hwndCtl, int iTab, LPCTSTR lpszText);
int SftTabs_InsertTab_A(HWND hwndCtl, int iTab, LPCSTR lpszText);
int SftTabs_InsertTab_W(HWND hwndCtl, int iTab, LPCWSTR lpszText);

C++

int CSftTabs::InsertTab(int iTab, LPCTSTR lpszText);

Parameters

hwndCtl

The window handle of the tab control.

iTab

The zero-based index of the tab to be added. If -1 is specified, the tab will be added at the end.

lpszText

A pointer 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 InsertTab function inserts a new tab at the specified position.

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. Tabs can be added using AddTab.

Example

This example inserts a tab with the tab text "A Test" at the third position:

C

index = SftTabs_InsertTab(hwndTab, 2, "A Test"); 

C++

index = m_Tab.InsertTab(2, "A Test");

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


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