Using Advanced List View Features

In Windows CE, you can set the order of the columns that display in report view by setting the iOrder member in the LVCOLUMN structure when you add a column to a list view control. You can also set the column order by using the LVM_GETCOLUMNORDERARRAY and LVM_SETCOLUMNORDERARRAY messages.

To display an image from an image list next to the title of a column in report view, specify LVCF_IMAGE in the mask member and LVCFMT_IMAGE in the fmt member. When you add a column to a list view control, specify the zero-based index of an image in the list in the iImage member of LVCOLUMN.

List view controls in Windows CE support a custom draw service, enables you to customize the appearance of a list view. If a list view provides this service, it sends the NM_CUSTOMDRAW notification at specific times during drawing operations.

Windows CE supports a list view style, LVS_OWNERDATA, for creating a virtual list view. The only data that a virtual list view manages is input focus and item selection data. All other data is managed by the owner of the list view. This enables a list view to handle very large data sets, especially in cases where the data is stored in a database that has its own data access methods.