Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

RowColHeaderPictureStyle

Defines the position of the picture displayed in the row/column header.

C

DWORD WINAPI SftTree_GetRowColHeaderPictureStyle(HWND hwndCtl);
void WINAPI SftTree_SetRowColHeaderPictureStyle(HWND hwndCtl, DWORD style);
DWORD WINAPI SftTreeSplit_GetRowColHeaderPictureStyle(HWND hwndCtl);
void WINAPI SftTreeSplit_SetRowColHeaderPictureStyle(HWND hwndCtl, DWORD style);

C++

DWORD CSftTree::GetRowColHeaderPictureStyle() const;
void CSftTree::SetRowColHeaderPictureStyle(DWORD style);
DWORD CSftTreeSplit::GetRowColHeaderPictureStyle() const;
void CSftTreeSplit::SetRowColHeaderPictureStyle(DWORD style);

Parameters

hwndCtl

The window handle of the tree control.

style

The picture location relative to the row/column header text.

One value of each of the following tables can be combined and passed as style parameter.

styleHorizontal row/column header picture alignment
SFTTREE_BMP_LEFTThe row/column header picture is displayed to the left of the header text. If no horizontal row/column header picture alignment value is specified, SFTTREE_BMP_LEFT is assumed.
SFTTREE_BMP_CENTERThe row/column header picture is displayed in the center of the row/column header, the row/column header text is not shown.
SFTTREE_BMP_RIGHTThe row/column header picture is displayed to the right of the row/column header text.
styleVertical row/column header picture alignment
SFTTREE_BMP_VCENTERThe row/column header picture is vertically centered within the row/column header. If no vertical row/column header alignment value is specified, SFTTREE_BMP_VCENTER is assumed.
SFTTREE_BMP_TOPThe row/column header picture is vertically aligned with the top of the row/column header.
SFTTREE_BMP_BOTTOMThe row/column header picture is vertically aligned with the bottom of the row/column header.

Returns

GetRowColHeaderPictureStyle returns a value indicating the position of the picture displayed in the row/column header.

Comments

The GetRowColHeaderPictureStyle and SetRowColHeaderPictureStyle functions define the position of the picture displayed in the row/column header.

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

Get/SetRowColBitmapStyle and Get/SetRowColPictureStyle are synonyms for Get/SetRowColHeaderPictureStyle.

Examples

C

            // 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 */
        {
            SFTTREE_COLORS Colors;
            SftTree_GetCtlColors(g_hwndTree, &Colors);/* Get current color settings */
            Colors.colorTreeLines = COLOR_3DDKSHADOW | 0x80000000L;/* Tree line color */
            Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */

C++

        // 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 */
    {
        SFTTREE_COLORS Colors;
        m_Tree.GetCtlColors(&Colors);    /* Get current color settings */
        Colors.colorTreeLines = COLOR_3DDKSHADOW | 0x80000000L;/* Tree line color */
        Colors.colorSelBgNoFocus = COLOR_BTNFACE | 0x80000000L;/* Selection background color (no input focus) */

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