SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines an item's cell text.
C
int SftTree_GetTextCol(HWND hwndCtl, int index, int realCol, LPTSTR lpszBuffer); int SftTree_GetText(HWND hwndCtl, int index, LPTSTR lpszBuffer); int WINAPI SftTree_GetText_A(HWND hwndCtl, int index, LPSTR lpszBuffer); int WINAPI SftTree_GetText_W(HWND hwndCtl, int index, LPWSTR lpszBuffer); BOOL SftTree_SetTextCol(HWND hwndCtl, int index, int realCol, LPCTSTR lpszBuffer); BOOL SftTree_SetText(HWND hwndCtl, int index, LPCTSTR lpszBuffer); BOOL WINAPI SftTree_SetText_A(HWND hwndCtl, int index, LPCSTR lpszBuffer); BOOL WINAPI SftTree_SetText_W(HWND hwndCtl, int index, LPCWSTR lpszBuffer); int SftTreeSplit_GetTextCol(HWND hwndCtl, int index, int realCol, LPTSTR lpszBuffer); int SftTreeSplit_GetText(HWND hwndCtl, int index, LPTSTR lpszBuffer); int WINAPI SftTreeSplit_GetText_A(HWND hwndCtl, int index, LPSTR lpszBuffer); int WINAPI SftTreeSplit_GetText_W(HWND hwndCtl, int index, LPWSTR lpszBuffer); BOOL SftTreeSplit_SetTextCol(HWND hwndCtl, int index, int realCol, LPCTSTR lpszBuffer); BOOL SftTreeSplit_SetText(HWND hwndCtl, int index, LPCTSTR lpszBuffer); BOOL WINAPI SftTreeSplit_SetText_A(HWND hwndCtl, int index, LPCSTR lpszBuffer); BOOL WINAPI SftTreeSplit_SetText_W(HWND hwndCtl, int index, LPCWSTR lpszBuffer);
C++
void CSftTree::GetText(int index, int realCol, CString& string) const; void CSftTree::GetText(int index, CString& string) const; int CSftTree::GetText(int index, int realCol, LPTSTR lpszBuffer) const; int CSftTree::GetText(int index, LPTSTR lpszBuffer) const; BOOL CSftTree::SetText(int index, int realCol, LPCTSTR lpszBuffer); BOOL CSftTree::SetText(int index, LPCTSTR lpszBuffer); void CSftTreeSplit::GetText(int index, int realCol, CString& string) const; void CSftTreeSplit::GetText(int index, CString& string) const; int CSftTreeSplit::GetText(int index, int realCol, LPTSTR lpszBuffer) const; int CSftTreeSplit::GetText(int index, LPTSTR lpszBuffer) const; BOOL CSftTreeSplit::SetText(int index, int realCol, LPCTSTR lpszBuffer); BOOL CSftTreeSplit::SetText(int index, LPCTSTR lpszBuffer);
hwndCtl
The window handle of the tree control.
index
The zero-based index number of the item for which text information is to be retrieved or set.
realCol
The zero-based column number whose text is to be retrieved or set.
lpszBuffer
A pointer to a buffer containing the item's text or where the item's cell text will be returned.
string
A reference to a CString object where the item's cell text will be returned.
GetText(Col) returns the number of characters returned in the buffer, not including the terminating '\0'. The buffer must be large enough to receive the complete text. GetTextLen can be used to determine the buffer length needed. -1 is returned if an error occurred.
SetText(Col) returns TRUE if the function was successful, otherwise FALSE is returned.
The GetText and SetText functions define an item's cell text.
The text retrieved is based on the column specified using realCol or last defined using SetAccessColumn. Functions, which do not allow the realCol parameter, access the column last defined by SetAccessColumn or the last column referenced by a column specific function. The last column accessed can be retrieved using GetAccessColumn.
In a tree control using a virtual data source, SetText(Col) cannot be used and an error is returned. The alpszString member of the SFTTREE_ITEM structure is used instead.
/*------------------------------------------------------------------------------*/ /* Add a few items. */ /*------------------------------------------------------------------------------*/ { int index; index = SftTree_AddString(g_hwndTree, TEXT("Progress Bars")); SftTree_SetTextCol(g_hwndTree, index, 0, TEXT("SftTree/DLL supports progress bars as cell background (partial or full size).")); // add progress bar samples { SFTTREE_CELLINFOPARM CellInfo; int i = SftTree_AddString(g_hwndTree, TEXT("Progress Bar - Full Size")); SftTree_SetItemLevel(g_hwndTree, i, 1);
/*------------------------------------------------------------------------------*/ /* Add a few items. */ /*------------------------------------------------------------------------------*/ { int index; index = m_Tree.AddString(_T("Progress Bars")); m_Tree.SetText(index, 0, _T("SftTree/DLL supports progress bars as cell background (partial or full size).")); // add progress bar samples { SFTTREE_CELLINFOPARM CellInfo; int i = m_Tree.AddString(_T("Progress Bar - Full Size")); m_Tree.SetItemLevel(i, 1);
See Also C/C++ API | Categories | Notifications