PRB: Listview Comes Up with No Images

ID: Q125628

The information in this article applies to:

SYMPTOMS

A list view is displayed with text and column headings, but the icons are not displayed.

CAUSE

The CImageList used to store the images for the list view is no longer in scope.

RESOLUTION

This can occur, for example, if you create a CImageList on the stack and create your listview, but at the point the listview is displayed, the image list has been destroyed. The ImageList functions will still return success, but no images will be displayed.

To avoid the problem, make sure your image list stays in scope.

STATUS

This behavior is by design.

Additional query words:

Keywords          : kbMFC kbNTOS400 kbWinOS95 
Issue type        : kbprb

Last Reviewed: December 31, 1998