Hide

SftTree/DLL 7.5 - Tree Control

Display
Print

CalcColumnFromPoint

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

C

int WINAPI SftTree_CalcColumnFromPoint(HWND hwndCtl, LPPOINT lpPt);
int WINAPI SftTree_CalcColumnFromPointEx(HWND hwndCtl, LPPOINT lpPt);
int WINAPI SftTreeSplit_CalcColumnFromPoint(HWND hwndCtl, LPPOINT lpPt);
int WINAPI SftTreeSplit_CalcColumnFromPointEx(HWND hwndCtl, LPPOINT lpPt);

C++

int CSftTree::CalcColumnFromPoint(LPPOINT lpPt) const;
int CSftTree::CalcColumnFromPointEx(LPPOINT lpPt) const;
int CSftTreeSplit::CalcColumnFromPoint(LPPOINT lpPt) const;
int CSftTreeSplit::CalcColumnFromPointEx(LPPOINT lpPt) 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 column number needs to be calculated.

Returns

The return value is the column number at the given location. The return value is -1 if no column is located at the specified point.

Comments

The CalcColumnFromPoint and CalcColumnFromPointEx functions calculate the column number given a point in tree control client area coordinates.

CalcColumnFromPoint always returns the actual column number. CalcColumnFromPointEx considers merged column headers and returns the column number of the first column in a group of merged column headers.

Use CalcIndexFromPoint to determine the item index or CalcCellFromPoint to determine the cell.

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