Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

ShowHeader

Defines the presence of column headers.

C

BOOL WINAPI SftTree_GetShowHeader(HWND hwndCtl);
void WINAPI SftTree_SetShowHeader(HWND hwndCtl, BOOL fSet);
BOOL WINAPI SftTreeSplit_GetShowHeader(HWND hwndCtl);
void WINAPI SftTreeSplit_SetShowHeader(HWND hwndCtl, BOOL fSet);

C++

BOOL CSftTree::GetShowHeader() const;
BOOL CSftTreeSplit::GetShowHeader() const;
void CSftTree::SetShowHeader(BOOL fSet = TRUE);
void CSftTreeSplit::SetShowHeader(BOOL fSet = TRUE);

Parameters

hwndCtl

The window handle of the tree control.

fSet

Set to TRUE to make headers visible, otherwise set to FALSE to hide headers.

Returns

GetShowHeader returns a value indicating whether column headers are shown. TRUE is returned if column headers are shown, otherwise FALSE is returned.

Comments

The GetShowHeader and SetShowHeader functions define the presence of column headers.

Column header attributes can be manipulated using SetColumns.

Examples

C

            NULL);
        if (!g_hwndTree)
            return -1;

        /* Resources, such as bitmaps, should be loaded and must remain    */
        /* valid until the tree control is destroyed or no longer uses     */
        /* these.  For example, use DeleteObject to delete any bitmaps.    */

        SftTree_SetShowHeader(g_hwndTree, TRUE);/* Show column headers */
        SftTree_SetItemLines(g_hwndTree, 5); /* (Maximum) number of text lines */
        /* Register the label picture size.  All label pictures    */
        /* used must be the same size.  Only one picture needs to  */
        /* be registered, even if several are used.                */
        Sft_InitPicture(&Pic);
        Sft_SetPictureSizeOnly(&Pic, PIC_SIZEX, PIC_SIZEY);/* Dimensions only for registration */
        SftTree_SetItemLabelPicture(g_hwndTree, -1, &Pic);/* Register the label picture size */

C++

        SFTTREESTYLE_SCROLL |            /* Honor WS_H/VSCROLL */
        WS_HSCROLL | WS_VSCROLL |        /* Vertical and horizontal scrollbars */
        WS_VISIBLE | WS_CHILD,           /* Visible, child window */
        CRect(0,0,0,0),                  /* Location */
        this,                            /* Parent window */
        IDC_TREE))                       /* Tree control ID */
            return -1;
    
    m_Tree.SetShowHeader(TRUE);          /* Show column headers */
    m_Tree.SetItemLines(5);              /* (Maximum) number of text lines */

    SFT_PICTURE Pic;

    /* Register the label picture size.  All label pictures    */
    /* used must be the same size.  Only one picture needs to  */
    /* be registered, even if several are used.                */

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