CTreeCtrl::SetImageList
CImageList* SetImageList( CImageList * pImageList, int nImageListType );
Return Value
Pointer to the previous image list, if any; otherwise NULL.
Parameters
pImageList
Pointer to the image list to assign. If pImageList is NULL, all images are removed from the tree view control.
nImageListType
Type of image list to set. The image list can be one of the following values:
TVSIL_NORMAL Sets the normal image list, which contains the selected and nonselected images for the tree view item.
TVSIL_STATE Sets the state image list, which contains the images for tree view items that are in a user-defined state.
Remarks
Call this function to set the normal or state image list for a tree view control and redraw the control using the new images.
这个函数不是可以实现么
Type of image list to set. The image list can be one of the following values:
第二个参数,没有你写的那个[/quote]
再认真地搜了下MSDN CListCtrl有这个参数LVSIL_SMALL,CTreeCtrl没有!但就算改成LVSIL_NORMAL还是不行
Type of image list to set. The image list can be one of the following values:
第二个参数,没有你写的那个[/quote]
有吧!
1.1 设置图像控制CListCtrl::SetImageList的调用格式如下:
CImageList* SetImageList( CImageList* pImageList, int nImageList );
其返回值是指向前一个图像列表控制的一个指针,如果不存在前一个图像列表则为NULL;其中参数pImageList是指向图像列表的标识,nImageList是图像列表的类型,可以是如下值:
LVSIL_NORMAL 用大图标方式进行图像列表;
LVSIL_SMALL 用小图标方式进行图像列表;
LVSIL_STATE 以图像状态进行图像列表;