CGXGridCore::GetCurrentCell
BOOL GetCurrentCell(ROWCOL* nRow, ROWCOL* nCol, BOOL bIgnorePrint = FALSE);
BOOL GetCurrentCell(ROWCOL& nRow, ROWCOL& nCol, BOOL bIgnorePrint = FALSE);
nRow
Reference or pointer where the method stores the row index.
nCol
Reference or pointer where the method stores the column index.
bIgnorePrint
Specifies if the method can return TRUE when printing-mode is active. Normally, in printing-mode the return value is FALSE.
Return Value
TRUE if a cell is the current cell; it is FALSE if there is no current cell selected.
Remarks
Returns TRUE if a cell is the current cell and retrieves its cell coordinates.
Example
OnFormatLookup determines if a current cell is selected as current cell and displays the style-sheet for the composed style of the cell.
void CGridSampleView::OnFormatLookup( )
{
ROWCOL nRow, nCol;
if (GetCurrentCell(nRow, nCol))
{
CGXStyle style;
ComposeStyleRowCol(nRow, nCol, &style);
CGXStyleSheet sheet("Current Cell");
sheet.SetStyle(style);
sheet.DoModal( );
}
}
See Also
CGXGridCore::IsCurrentCell CGXGridCore::SetCurrentCell