Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

DisplayCellRectForItem

Returns the location of a cell.

C

BOOL WINAPI SftTree_GetDisplayCellRectForItem(HWND hwndCtl,
        int index,
        int displayCol,
        LPRECT lpRect,
        int* lpSpan);
BOOL WINAPI SftTreeSplit_GetDisplayCellRectForItem(HWND hwndCtl,
        int index,
        int displayCol,
        LPRECT lpRect,
        int* lpSpan);

C++

BOOL CSftTree::GetDisplayCellRectForItem(int index,
        int displayCol,
        LPRECT lpRect,
        int* lpSpan) const;
BOOL CSftTreeSplit::GetDisplayCellRectForItem(int index,
        int displayCol,
        LPRECT lpRect,
        int* lpSpan) const;

Parameters

hwndCtl

The window handle of the tree control.

index

The zero-based index of the item for which the cell position is to be retrieved.

displayCol

The zero-based column number of the cell for which the position is to be retrieved.

lpRect

A pointer to a RECT structure where the location of the cell is returned (in pixels). Before calling this function, the height of the item must be provided in this structure. GetDisplayCellRectForItem only updates the width and starting offset of the cell.

lpSpan

A pointer to a variable where the number of columns is returned that the cell occupies. If cell merging is allowed and the cell merges into an adjacent cell, it can span more than one column. This parameter may be NULL.

Returns

GetDisplayCellRectForItem returns TRUE if successful, otherwise FALSE is returned.

Comments

The GetDisplayCellRectForItem function returns the location of a cell.

The RECT structure lpRect describes the location of the specified cell. It can be used for cell editing to create a Windows control of the correct size.

GetDisplayCellRectForItem only updates the width and starting offset of the cell. If the height of the cell (or item) is not known, the function GetDisplayCellRect can be used instead.

GetItemRect returns the coordinates of an entire item.

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