<< Return to Main Index

< Return to Class Index

CGXGridCore::CalcClientRowFromPt

ROWCOL CalcClientRowFromPt(CPoint& pt, int* yUp = NULL);

pt

Specifies the y-coordinate of the point.

yUp

Points to an integer where the method will store the top y-coordinate of the row. If it is NULL, the method will ignore this parameter.

Return Value

The relative index of the row. It is GX_INVALID when no row could be determined at the given point.

Remarks

Determines the row for the point.

Example

This example determines the relative row index and invalidates the window area of this row.

ROWCOL nRow = CalcClientRowFromPt(CPoint(0, y);
if (nRow != GX_INVALID)                      
{  
   CRect r = GetGridRect( );
   r.top += CalcSumOfClientRowHeights(0, nRow);
   InvalidateRect(r);
   UpdateWindow( );
}

See Also

CGXGridCore::HitTest CGXGridCore::CalcSumOfClientRowHeights

CGXGridCore

Class Overview | Class Members