Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

GetTabLabel

Retrieves a tab's text.

C

int SftTabs_GetTabLabel(HWND hwndCtl, int iTab, LPTSTR lpsz);
int SftTabs_GetTabLabel_A(HWND hwndCtl, int iTab, LPSTR lpsz);
int SftTabs_GetTabLabel_W(HWND hwndCtl, int iTab, LPWSTR lpsz);

C++

int CSftTabs::GetTabLabel(int iTab, LPTSTR lpsz) const;
void CSftTabs::GetTabLabel(int iTab, CString& string) const;

Parameters

hwndCtl

The window handle of the tab control.

iTab

The zero-based index of the tab for which information is to be retrieved.

lpsz

A pointer to a buffer where the tab's text will be returned.

string

A reference to a CString object, where the text will be returned.

Returns

The return value is the number of characters returned in the buffer, not including the terminating '\0'. The buffer must be large enough to receive the complete text. GetTabLabelLen can be used to determine the buffer length needed. -1 is returned if an error occurred.

Comments

The GetTabLabel function retrieves a tab's text.

A tab's text can be changed using SetTabLabel.

Example

This example retrieves the text of the second tab:

C

TCHAR szBuffer[80]; 
SftTabs_GetTabLabel(hwndTab, 1, szBuffer); 

C++

CString str;
m_Tab.GetTabLabel(1, str);
TCHAR szBuffer[80]; 
m_Tab.GetTabLabel(1, szBuffer);

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


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