1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
void CMyListView::OnInitialUpdate()
{
CListView::OnInitialUpdate();
// this code only works for a report-mode list view
ASSERT(GetStyle() & LVS_REPORT);
CListCtrl& theCtrl = GetListCtrl() ;
theCtrl.InsertColumn(0,"COMPTE",LVCFMT_LEFT,55);
theCtrl.InsertColumn(1,"FOURNISSEUR",LVCFMT_LEFT,100);
theCtrl.InsertColumn(2,"TIRE",LVCFMT_LEFT,100);
theCtrl.InsertColumn(3,"MONTANT",LVCFMT_RIGHT,80);
for(int nLig=0;n<nMaxLig;nLig++)
{
theCtrl.InsertItem( nLig , 4010001);
theCtrl.SetItemText(nLig, 1, nom);
theCtrl.SetItemText( nLig, 2,
.);
theCtrl.SetItemText(nLig, 3,100.00);
//
}
} |
Partager