DBVLIST: Demonstrates CListView and CDaoRecordset

Click to open or copy the DBVLIST project files.

The DBVLIST sample uses MFC's CListView and CDaoRecordset classes to implement the virtual list view functionality that is available for the list view common control beginning with Microsoft Internet Explorer 4.0.

The sample demonstrates how virtual list views can be used to display very large lists of items as well as items that may not all be in memory at once. It displays a list of database items (employee records) filtered by division that is selectable by the user at run time.

Running the Sample

Initially, DBVLIST comes up blank. Simply select the division you want to view with the combo box in the upper pane, and then click the Fetch Results button. The results will appear in the list view in the pane in the lower half of the window. You can also change the sort order of the list by clicking the column header of the item you want to sort.

This sample demonstrates the following keywords:

CDaoRecordset::IsOpen; CDaoRecordset::Open; CDaoRecordset::Requery; CDaoRecordset::IsEOF; CDaoRecordset::MoveNext; CDaoRecordset::MoveFirst; CDaoRecordset::GetRecordCount; CListView::GetListCtrl; CListCtrl::InsertColumn; CListView::OnChildNotify