CImageList img; SHFILEINFO lf; ::ZeroMemory(&lf,sizeof(lf)); HIMAGELIST ht; ht=(HIMAGELIST) ::SHGetFileInfo(_T("C:\\"),NULL,&lf,sizeof(lf),SHGFI_LARGEICON|SHGFI_SYSICONINDEX); img.Attach(ht); DWORD style; style=this->m_ListCtrl.GetExtendedStyle(); style=style|LVS_EX_CHECKBOXES; this->m_ListCtrl.SetExtendedStyle(style); this->m_ListCtrl.SetImageList(&img,LVSIL_NORMAL); LVITEM lm; lm.mask=LVIF_IMAGE|LVIF_TEXT; lm.iItem=0; lm.iSubItem=0; lm.iImage=lf.iIcon; lm.pszText=(LPTSTR)_T("myCdevice"); m_ListCtrl.InsertItem(&lm);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)