Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

CalcCellFromPoint

Calculates the item index and column number given a point in tree control client area coordinates.

C

BOOL WINAPI SftTree_CalcCellFromPoint(HWND hwndCtl,
        LPPOINT lpPt,
        int * lpIndex,
        int * lpCol);
BOOL WINAPI SftTreeSplit_CalcCellFromPoint(HWND hwndCtl,
        LPPOINT lpPt,
        int * lpIndex,
        int * lpCol);

C++

BOOL CSftTree::CalcCellFromPoint(LPPOINT lpPt,
        int* lpIndex,
        int* lpCol) const;
BOOL CSftTreeSplit::CalcCellFromPoint(LPPOINT lpPt,
        int* lpIndex,
        int* lpCol) const;

Parameters

hwndCtl

The window handle of the tree control.

lpPt

The x and y coordinates in pixels (relative to the upper left corner of the tree control), for which the item index and column number need to be calculated.

lpIndex

A pointer to an integer where the item index is returned.

lpCol

A pointer to an integer where the column number is returned.

Returns

The return value is TRUE if the function was successful, otherwise FALSE.

Comments

The CalcCellFromPoint function calculates the item index and column number given a point in tree control client area coordinates.

If the location lpPt is not located in a cell, FALSE is returned.

Use CalcIndexFromPoint to determine the item index or CalcColumnFromPoint to determine the column number.

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