Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

SFTTREE_CELLINFOPARM Structure

The SFTTREE_CELLINFOPARM structure is used as parameter for GetCellInfo and SetCellInfo to retrieve and set cell attributes.

typedef struct tagSftTreeCellInfoParm {
    int version;                        // structure version
    int index;                          // item index
    int iCol;                           // column number
    SFTTREE_CELL Cell;                  // cell information
} SFTTREE_CELLINFOPARM, * LPSFTTREE_CELLINFOPARM;
typedef const SFTTREE_CELLINFOPARM * LPCSFTTREE_CELLINFOPARM;

Members

version

An integer value specifying the SFTTREE_CELLINFOPARM structure version to be used. This member must be set to the value 7.

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 cell picture size. See SetCellInfo for more information.

iCol

An integer value specifying the zero-based column number of the cell whose attributes are to be set or retrieved.

Cell

A structure describing the cell's attributes. See SFTTREE_CELL for more information.

Comments

The SFTTREE_CELLINFOPARM structure is used as parameter for GetCellInfo and SetCellInfo to retrieve and set cell attributes.

Examples

C

#define PIC_SIZEY_SORT           8      /* Height of sort direction indicator */

/**********************************************************************/
/*                         Helper Routines                            */
/**********************************************************************/

static void SetCellPicture(HWND hwndTree, int index, SFT_PICTURE* pPic, int align)
{
    SFTTREE_CELLINFOPARM CellInfo;
    CellInfo.version = 7;
    CellInfo.index = index;
    CellInfo.iCol = 0;
    SftTree_GetCellInfo(hwndTree, &CellInfo);
    Sft_ClearPicture(&CellInfo.Cell.CellPicture1);
    Sft_CopyPicture(&CellInfo.Cell.CellPicture1, pPic);
    CellInfo.Cell.flag = align;

C++

#endif //_DEBUG

/**********************************************************************/
/*                         Helper Routines                            */
/**********************************************************************/

void CSampleView::SetCellPicture(int index, SFT_PICTURE* pPic, int align)
{
    SFTTREE_CELLINFOPARM CellInfo;
    CellInfo.version = 7;         
    CellInfo.index = index;
    CellInfo.iCol = 0;
    m_Tree.GetCellInfo(&CellInfo);
    Sft_ClearPicture(&CellInfo.Cell.CellPicture1);
    Sft_CopyPicture(&CellInfo.Cell.CellPicture1, pPic);
    CellInfo.Cell.flag = align;

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