我用CListCtrl::SetImageList函数设置控件的图标的列表,控件的风格设置为Icon风格时,可以显示列表项图标,但设置为Report风格时却不能显示,请问在Report风格下怎么显示列表项的图标?

解决方案 »

  1.   

    http://www.codeguru.com/listview/CListCtrlEx.html
      

  2.   

    当设置了LVSIL_SMALL(小图标列表)时Report风格才会显示图标CListCtrl::SetImageList
    This method assigns an image list to a list view control.CImageList* SetImageList( 
    CImageList* pImageList, 
    int nImageListType ); 
    Parameters
    pImageList 
    Specifies the pointer to the image list to assign. 
    nImageListType 
    Specifies the type of image list. It can be one of these values: 
    LVSIL_NORMAL   Image list with large icons. 
    LVSIL_SMALL   Image list with small icons. 
    LVSIL_STATE   Image list with state images. 
    Return Value