ALXSoft

Utilities, source code, examples for programmers on Visual C ++

Home
News
ALXGrid Control
Samples
Documentation
Download
alxBASE library
Samples
Documentation
Download
DBFRead utility
Download
DBFNavigator utility
Download
IDXView utility
Download
MDXView utility
Download
NDXView utility
Download
NTXView utility
Download
NSXView utility
Download
Links

Russian version

VISIT THE FILE TRANSIT

Sample "GridRange"
GridRange window

    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;
}

Alexey. E-mail: alxsoft@gazinter.net

Hosted by uCoz