List Control的View属性为:Icon (我用的是VS2005)。在类的头文件中声明的变量:
public:CListCtrl m_listc;public:HICON hIcon;public:CImageList* m_ImageListBmp;
以下代码为点击确定按钮函数里的:
hIcon = AfxGetApp()->LoadIcon(IDI_TUBIAO);m_ImageListBmp = new CImageList();m_ImageListBmp->Create(32,32,ILC_COLOR32| ILC_MASK,0,10);m_ImageListBmp->Add( hIcon );m_listc.SetImageList(m_ImageListBmp, LVSIL_NORMAL );m_listc.InsertItem(0,L"3333",1);
运行效果图:请问是什么原因啊,在线等。