Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

SFTTREE_ROWINFOPARM Structure

The SFTTREE_ROWINFOPARM structure is used as parameter for GetRowInfo and SetRowInfo to retrieve and set row header attributes.

typedef struct tagSftTreeRowInfoParm {
    int version;                        // structure version
    int index;                          // item index
    SFTTREE_ROW Row;                    // row header information
} SFTTREE_ROWINFOPARM, * LPSFTTREE_ROWINFOPARM;
typedef const SFTTREE_ROWINFOPARM * LPCSFTTREE_ROWINFOPARM;

Members

version

The structure version number. Must be set to the value 5.

index

An integer value specifying the zero-based index of the item whose attributes are to be set or retrieved. This value can be set to -1 to register a row header picture size. See SetRowInfo for more information.

Row

The SFTTREE_ROW structure describing the row header of the specified item.

Comments

The SFTTREE_ROWINFOPARM structure is used as parameter for GetRowInfo and SetRowInfo to retrieve and set row header attributes.

Examples

C

static void SetItemLabelPicture(HWND hwndTree, int index, SFT_PICTURE* pPic)
{
    SftTree_SetItemLabelPicture(hwndTree, index, pPic);
}

static void SetRowPicture(HWND hwndTree, int index, SFT_PICTURE* pPic)
{
    SFTTREE_ROWINFOPARM RowInfo;
    RowInfo.version = 7;
    RowInfo.index = index;
    SftTree_GetRowInfo(hwndTree, &RowInfo);
    Sft_ClearPicture(&RowInfo.Row.RowPicture1);
    Sft_CopyPicture(&RowInfo.Row.RowPicture1, pPic);
    RowInfo.Row.flag = SFTTREE_BMP_RIGHT;
    SftTree_SetRowInfo(hwndTree, &RowInfo);
}

C++

    Sft_ClearPicture(&CellInfo.Cell.CellPicture1);
    Sft_CopyPicture(&CellInfo.Cell.CellPicture1, pPic);
    CellInfo.Cell.flag = align;
    m_Tree.SetCellInfo(&CellInfo);
}

void CSampleView::SetRowPicture(int index, SFT_PICTURE* pPic)
{
    SFTTREE_ROWINFOPARM RowInfo;
    RowInfo.version = 7;          
    RowInfo.index = index;
    m_Tree.GetRowInfo(&RowInfo);
    Sft_ClearPicture(&RowInfo.Row.RowPicture1);
    Sft_CopyPicture(&RowInfo.Row.RowPicture1, pPic);
    RowInfo.Row.flag = SFTTREE_BMP_RIGHT;
    m_Tree.SetRowInfo(&RowInfo);

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