Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

RowInfo

Defines an item's row header attributes.

C

BOOL WINAPI SftTree_GetRowInfo(HWND hwndCtl, LPSFTTREE_ROWINFOPARM lpRowParm);
BOOL WINAPI SftTree_SetRowInfo(HWND hwndCtl, LPCSFTTREE_ROWINFOPARM lpRowParm);
BOOL WINAPI SftTreeSplit_GetRowInfo(HWND hwndCtl, LPSFTTREE_ROWINFOPARM lpRowParm);
BOOL WINAPI SftTreeSplit_SetRowInfo(HWND hwndCtl, LPCSFTTREE_ROWINFOPARM lpRowParm);

C++

BOOL CSftTree::GetRowInfo(LPSFTTREE_ROWINFOPARM lpRowParm) const;
BOOL CSftTree::SetRowInfo(LPCSFTTREE_ROWINFOPARM lpRowParm);
BOOL CSftTreeSplit::GetRowInfo(LPSFTTREE_ROWINFOPARM lpRowParm) const;
BOOL CSftTreeSplit::SetRowInfo(LPCSFTTREE_ROWINFOPARM lpRowParm);

Parameters

hwndCtl

The window handle of the tree control.

lpRowParm

A pointer to a SFTTREE_ROWINFOPARM structure where row information is to be retrieved (GetRowInfo) or new row information for the specified item (SetRowInfo).

Returns

The return value is TRUE if the function is successful, FALSE if an error occurred.

Comments

The GetRowInfo and SetRowInfo functions define an item's row header attributes.

To modify a row header's attributes, the GetRowInfo function is used to retrieve its current attributes. The SFTTREE_ROW structure, part of the SFTTREE_ROWINFOPARM structure, can then be modified, setting the desired attributes. Finally, the row header is updated by a call to the SetRowInfo function.

Row header text can be retrieved using GetRowText and modified using SetRowText.

Row headers are made visible using SetShowRowHeader.

In a tree control using a virtual data source, SetRowInfo can only be used to register a row header picture size.

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