急需! 用MFC往树控件前添加一个图标
我的代码如下:CImageListm_image;m_image.Create(16,16,ILC_COLOR8|ILC_MASK,1,0);m_image.Add(Af...
我的代码如下:
CImageList m_image;
m_image.Create(16,16,ILC_COLOR8|ILC_MASK,1,0);
m_image.Add(AfxGetApp()->LoadIcon(IDI_ICON15));
m_image.Add(AfxGetApp()->LoadIcon(IDI_ICON16));
CTreeCtrl m_ctlTree;
//SetImageList( m_image,0);
m_treeTaskList.SetImageList(&m_image,TVSIL_NORMAL);
m_treeTaskList.MoveWindow(&rt,TRUE);
HTREEITEM root = m_treeTaskList.InsertItem("根节点",0,1);
为什么运行后根节点前没有图标,却出现一点空白的地方? 展开
CImageList m_image;
m_image.Create(16,16,ILC_COLOR8|ILC_MASK,1,0);
m_image.Add(AfxGetApp()->LoadIcon(IDI_ICON15));
m_image.Add(AfxGetApp()->LoadIcon(IDI_ICON16));
CTreeCtrl m_ctlTree;
//SetImageList( m_image,0);
m_treeTaskList.SetImageList(&m_image,TVSIL_NORMAL);
m_treeTaskList.MoveWindow(&rt,TRUE);
HTREEITEM root = m_treeTaskList.InsertItem("根节点",0,1);
为什么运行后根节点前没有图标,却出现一点空白的地方? 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询