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 the LVCOLUMN.

List view controls in Windows CE support a custom draw service, which gives you flexibility to customize a list view's appearance. If a list view provides this service, it sends the NM_CUSTOMDRAW notification at specific times during drawing operations. For information on the custom draw service, see Overview of Controls.

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 information. 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.