It is the simple sample, showing how to connect
"ALX" classes to your appendix, and also an
opportunity of display of a plenty of row and columns.
Class CGridView is determined from parent class CALXGridView. In it's constructor are added 1000 column and the amount of rows 1 000 000 is defined.
CGridView::CGridView()
{
CString strHeadText;
for(int i =
0; i < 1000; i++)
{
strHeadText.Format("%u",i);
DefineColCtrl(AddCol(100,strHeadText,
ACFF_CENTER, AHFF_CENTER),GA_CELLCTRL);
}
SetGridRowCount(1000000);
}
Also virtual function GetCellData() which returns the data of cells
necessary for display is redefined.
CELL_DATA CGridView::GetCellData(int nCol, int nRow)
{
CELL_DATA CellData = CALXGrid::GetCellData(nCol,nRow);
CellData.m_strText.Format("%u - %u",nCol,nRow);
return CellData;
}
|