virtual BOOL OnStartSelection(ROWCOL nRow, ROWCOL nCol, UINT flags, CPoint point);??
nRow
Specifies the row id.
nCol
Specifies the column id.
flags
MK_SHIFT Set if the SHIFT key is down.
point
Specifies the x- and y-coordinate of the cursor. These coordinates are always relative to the upper-left corner of the window.
TRUE if the user can start selecting cells at the given cell; FALSE to prevent selecting cells.
This method is called when the user has pressed the mouse in a cell and starts selecting cells.
You can override this method if you want to restrict the area where the user can select cells (you will then also have to override CanChangeSelection). If you want to disable selecting cells globally, you should call GetParam( )->EnableSelection(...).
This example only allows selecting cells for rows 5 to 10:
BOOL CSampleView::OnStartSelection(ROWCOL nRow, ROWCOL nCol, UINT flags, CPoint point)
{
nRow, nCol, point, flags;
return nRow >= 5 && nRow <= 10;
}
CGXGridCore::CanChangeSelection CGXGridCore::OnChangedSelection CGXGridParam::EnableSelection
Class Overview | Class Members