Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

Header

Defines a column's header text.

C

int SftTree_GetHeaderCol(HWND hwndCtl, int realCol, LPTSTR lpszBuffer, int cbMax);
int SftTree_GetHeader(HWND hwndCtl, LPTSTR lpszBuffer, int cbMax);
int WINAPI SftTree_GetHeader_W(HWND hwndCtl, LPWSTR lpszBuffer, int cbMax);
int WINAPI SftTree_GetHeader_A(HWND hwndCtl, LPSTR lpszBuffer, int cbMax);
BOOL SftTree_SetHeaderCol(HWND hwndCtl, int realCol, LPCTSTR lpszBuffer);
BOOL SftTree_SetHeader(HWND hwndCtl, LPCTSTR lpszBuffer);
BOOL WINAPI SftTree_SetHeader_A(HWND hwndCtl, LPCSTR lpszBuffer);
BOOL WINAPI SftTree_SetHeader_W(HWND hwndCtl, LPCWSTR lpszBuffer);
int SftTreeSplit_GetHeaderCol(HWND hwndCtl, int realCol, LPTSTR lpszBuffer, int cbMax);
int SftTreeSplit_GetHeader(HWND hwndCtl, LPTSTR lpszBuffer, int cbMax);
int WINAPI SftTreeSplit_GetHeader_W(HWND hwndCtl, LPWSTR lpszBuffer, int cbMax);
int WINAPI SftTreeSplit_GetHeader_A(HWND hwndCtl, LPSTR lpszBuffer, int cbMax);
BOOL SftTreeSplit_SetHeaderCol(HWND hwndCtl, int realCol, LPCTSTR lpszBuffer);
BOOL SftTreeSplit_SetHeader(HWND hwndCtl, LPCTSTR lpszBuffer);
BOOL WINAPI SftTreeSplit_SetHeader_A(HWND hwndCtl, LPCSTR lpszBuffer);
BOOL WINAPI SftTreeSplit_SetHeader_W(HWND hwndCtl, LPCWSTR lpszBuffer);

C++

void CSftTree::GetHeader(int realCol, CString& string) const;
void CSftTree::GetHeader(CString& string) const;
int CSftTree::GetHeader(int realCol, LPTSTR lpszBuffer, int cbMax) const;
int CSftTree::GetHeader(LPTSTR lpszBuffer, int cbMax) const;
BOOL CSftTree::SetHeader(int realCol, LPCTSTR lpszBuffer);
BOOL CSftTree::SetHeader(LPCTSTR lpszBuffer);
void CSftTreeSplit::GetHeader(int realCol, CString& string) const;
void CSftTreeSplit::GetHeader(CString& string) const;
int CSftTreeSplit::GetHeader(int realCol, LPTSTR lpszBuffer, int cbMax) const;
int CSftTreeSplit::GetHeader(LPTSTR lpszBuffer, int cbMax) const;
BOOL CSftTreeSplit::SetHeader(int realCol, LPCTSTR lpszBuffer);
BOOL CSftTreeSplit::SetHeader(LPCTSTR lpszBuffer); 

Parameters

hwndCtl

The window handle of the tree control.

realCol

The zero-based column number whose text is to be retrieved or set.

lpszBuffer

A pointer to a buffer where the header text will be returned (GetHeader) or a buffer containing the new header text (SetHeader).

string

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

cbMax

The maximum number of characters to be returned in the buffer pointed to by lpszBuffer, including the terminating '\0'.

Returns

GetHeader (GetHeaderCol) returns the number of characters returned in the buffer, not including the terminating '\0'. If the buffer is too small to receive the complete header text, the text is truncated. -1 is returned if an error occurred.

SetHeader (SetHeaderCol) returns TRUE if the function was successful, otherwise FALSE is returned.

Comments

The GetHeader and SetHeader functions define a column's header text.

The header text set or 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.

Header text can contain multiple lines of text using cr-lf (\r\n). SetMultilineHeader must be used to enable multiple lines of text. The SetHeader function cannot be used to add more text lines than the header already contains. When increasing the number of text lines, the SetColumns function must be used instead.

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