PRB: Listview Comes Up with No Images

ID: Q125628


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) on the following platform:
  • Microsoft Windows NT 3.51
  • Microsoft Windows 95


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
Version : WINDOWS:95; winnt:3.51
Platform : WINDOWS winnt
Issue type : kbprb


Last Reviewed: January 6, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.