Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

RowColHeaderText

Defines the row/column header text.

C

int SftTree_GetRowColHeaderText(HWND hwndCtl, LPTSTR lpszBuffer, int cbMax);
int WINAPI SftTree_GetRowColHeaderText_A(HWND hwndCtl, LPSTR lpszBuffer, int cbMax);
int WINAPI SftTree_GetRowColHeaderText_W(HWND hwndCtl, LPWSTR lpszBuffer, int cbMax);
BOOL SftTree_SetRowColHeaderText(HWND hwndCtl, LPCTSTR lpszBuffer);
BOOL WINAPI SftTree_SetRowColHeaderText_A(HWND hwndCtl, LPCSTR lpszBuffer);
BOOL WINAPI SftTree_SetRowColHeaderText_W(HWND hwndCtl, LPCWSTR lpszBuffer);
int WINAPI SftTreeSplit_GetRowColHeaderText(HWND hwndCtl, LPTSTR lpszBuffer, int cbMax);
int WINAPI SftTreeSplit_GetRowColHeaderText_A(HWND hwndCtl, LPSTR lpszBuffer, int cbMax);
int WINAPI SftTreeSplit_GetRowColHeaderText_W(HWND hwndCtl, LPWSTR lpszBuffer, int cbMax);
BOOL WINAPI SftTreeSplit_SetRowColHeaderText(HWND hwndCtl, LPCTSTR lpszBuffer);
BOOL WINAPI SftTreeSplit_SetRowColHeaderText_A(HWND hwndCtl, LPCSTR lpszBuffer);
BOOL WINAPI SftTreeSplit_SetRowColHeaderText_W(HWND hwndCtl, LPCWSTR lpszBuffer);

C++

void CSftTree::GetRowColHeaderText(CString& string) const;
int CSftTree::GetRowColHeaderText(LPTSTR lpszBuffer, int cbMax) const;
BOOL CSftTree::SetRowColHeaderText(LPCTSTR lpszBuffer);
void CSftTreeSplit::GetRowColHeaderText(CString& string) const;
int CSftTreeSplit::GetRowColHeaderText(LPTSTR lpszBuffer, int cbMax) const;
BOOL CSftTreeSplit::SetRowColHeaderText(LPCTSTR lpszBuffer);

Parameters

hwndCtl

The window handle of the tree control.

lpszBuffer

A pointer to a buffer where the row/column header text will be returned (GetRowColHeaderText) or a buffer containing the new row/column header text (SetRowColHeaderText).

string

A reference to a CString object, where the row/column 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

GetRowColHeaderText 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.

SetRowColHeaderText returns TRUE if the function was successful, otherwise FALSE is returned.

Comments

The GetRowColHeaderText and SetRowColHeaderText functions define the row/column header text.

GetRowColHeaderTextLen can be used to determine the required lpszBuffer size.

Row/column header text may contain multiple lines of text, delimited using cr-lf (\r\n), based on the settings defined using MultilineHeader and it must contain the same or fewer lines of text as defined for all column headers.

The row/column header area is only shown if row headers and column headers are both shown (see SetShowRowHeader and SetShowHeader).

Get/RowColText is a synonym for Get/SetRowColHeaderText.

Examples

C

            // RowInfo.version = 7;          
            // RowInfo.index = index;
            // SftTree_GetRowInfo(g_hwndTree, &RowInfo);
            // /* m_hRowBitmap = LoadBitmap(app_instance, MAKEINTRESOURCE(IDB_your_bitmap)); *//* Row header picture */
            // Sft_SetPictureBitmap(&RowInfo.Row.RowPicture1, m_hRowBitmap);
            // RowInfo.Row.flag = SFTTREE_BMP_RIGHT;
            // SftTree_SetRowInfo(g_hwndTree, &RowInfo);
        }
        SftTree_SetRowColHeaderText(g_hwndTree, TEXT(""));/* Row/column header text */
        SftTree_SetRowColHeaderStyle(g_hwndTree, ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */
        Sft_InitPicture(&Pic);
        Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */
        SftTree_SetRowColHeaderPicture(g_hwndTree, &Pic);/* Row/column picture */
        SftTree_SetRowColHeaderPictureStyle(g_hwndTree, SFTTREE_BMP_RIGHT);/* Row/column picture alignment */
        SftTree_SetCharSearchMode(g_hwndTree, SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */
        /* Change the default colors */

C++

        // RowInfo.version = 7;          
        // RowInfo.index = index;
        // m_Tree.GetRowInfo(&RowInfo);
        // /* m_RowBitmap.LoadBitmap(IDB_your_bitmap); *//* Row header picture */
        // Sft_SetPictureBitmap(&RowInfo.Row.RowPicture1, m_RowBitmap);
        // RowInfo.Row.flag = SFTTREE_BMP_RIGHT;
        // m_Tree.SetRowInfo(&RowInfo);
    }
    m_Tree.SetRowColHeaderText(_T("?"));       /* Row/column header text */
    m_Tree.SetRowColHeaderStyle(ES_LEFT | SFTTREE_HEADER_UP);/* Row/column header style */
    Sft_InitPicture(&Pic);               /* Initialize */
    Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Row/column header picture */
    m_Tree.SetRowColHeaderPicture(&Pic);       /* Row/column picture */
    m_Tree.SetRowColHeaderPictureStyle(SFTTREE_BMP_RIGHT);/* Row/column picture alignment */
    m_Tree.SetCharSearchMode(SFTTREE_CHARSEARCH_ALLCHARS, -1);/* Consider all characters typed */
    /* Change the default colors */

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