MFC中如何在列表框控件中显示位图
CImageList*m_imageList;//类成员变量CListCtrlm_listCtrlPal;//类成员变量m_imageList=newCImageList...
CImageList *m_imageList; //类成员变量
CListCtrl m_listCtrlPal; //类成员变量
m_imageList = new CImageList();
m_imageList->Create ( 32, 32, ILC_COLOR4 , 0, 1 );
m_imageList->Add(AfxGetApp()->LoadIcon(IDI_ICON4));
m_imageList->Add(AfxGetApp()->LoadIcon(IDR_MAINFRAME));
m_listCtrlPal.SetImageList(m_imageList, LVSIL_SMALL);
m_listCtrlPal.InsertItem(LVIF_TEXT|LVIF_STATE, 1, "SDFDSGDFGH",
LVIS_SELECTED , LVIS_SELECTED,
0, 0);
但在列表框中没有显示出位图!!
如何显示多张位图呀????? 展开
CListCtrl m_listCtrlPal; //类成员变量
m_imageList = new CImageList();
m_imageList->Create ( 32, 32, ILC_COLOR4 , 0, 1 );
m_imageList->Add(AfxGetApp()->LoadIcon(IDI_ICON4));
m_imageList->Add(AfxGetApp()->LoadIcon(IDR_MAINFRAME));
m_listCtrlPal.SetImageList(m_imageList, LVSIL_SMALL);
m_listCtrlPal.InsertItem(LVIF_TEXT|LVIF_STATE, 1, "SDFDSGDFGH",
LVIS_SELECTED , LVIS_SELECTED,
0, 0);
但在列表框中没有显示出位图!!
如何显示多张位图呀????? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询