i have two custom dialogs. One of the dialog contain a ListView control and it is displayed with a button on the other dialog, Before it is shown,I want its listview control to be filled with certain items. My code is like this:


void CBillPage1::OnButtonGenerate()
{
// TODO: Add your control notification handler code here
// Soem code here......
// ...............
// ............... database variable etc
// table difintiion
table.Open();

// Fill dlg with items
while (!table.IsEOF())
{
dlg->m_ListBill.InsertItem(0,table.m_Date); // here is the problem
table.MoveNext();
}
// Report dialog is selected
dlg->DoModal();
}

It does not give compilation error but gives nun time error at the InsertItem() line.
Please help