CGXGridCore::GetStyleArray
virtual CObArray* GetStyleArray(const CGXRange& range, int nType, CGXLongOperation* pTheOp);
range
Specifies the range of cells.
nType
Specifies the nType that should be passed to GetStyleRowCol.
pTheOp
An pointer to a CGXLongOperation object. Can be NULL. If a valid pointer is passed GetStyleArray will call pTheOp->DoMessages() while looping through the cells.
Remarks
GetStyleArray loops through a give cells of ranges and calls GetStyleRowCol for each cell. The result will be stored in an array that is returned by this method.
Example:
CObArray* pOldCellsArray = NULL; // will be filled with style setting
CGXLongOperation theOp;
theOp.SetStatusText(GXGetAppData()->strmDragDropCopy, FALSE);
theOp.SetCanRollback(TRUE);
CGXRange range(nRow, nCol, nRow+rg.GetHeight()-1, nCol+rg.GetWidth()-1);
// Get style info for cells
TRY
{
pOldCellsArray = GetStyleArray(range, m_nExpressionValueType, &theOp);
}
CATCH(CMemoryException, e)
{
// shall I continue?
if (AfxMessageBox(GX_IDS_CANNOTUNDO, MB_OKCANCEL) == IDCANCEL)
return FALSE;
}
AND_CATCH(CUserException, e)
{
// user aborted, clean up
return FALSE;
}
END_CATCH
See Also
CGXGridCore::GetStyleRowColCGXLongOperation