a.Create(100,100, ILC_COLOR32 |ILC_MASK , 8, 1);
ATL::CImage img;
CBitmap *bitmap = NULL;
bitmap = new CBitmap();
HRESULT ret = img.Load(fileName); // strBmpPath為圖片的路徑名
//MessageBox(fileName);
HBITMAP hbitmap = img.Detach();
HANDLE hBB = CopyImage((HANDLE)hbitmap,IMAGE_BITMAP,100,100,LR_COPYRETURNORG);
hbitmap = (HBITMAP)hBB;
bitmap->Attach(hbitmap);
//hicon[0] = AfxGetApp()->LoadIcon(IDI_ICON1);
a.Add(bitmap,RGB(0,0, 0));
delete bitmap;
CString strTemp;
char str[20];
char strr[20];
_splitpath(fileName,NULL,NULL,strr,str);
strTemp.Format(_T("%s%s"),strr,str);
m_ListCtrl.SetImageList(&a,LVSIL_NORMAL);
// for (int n = 0; n < nt; n++) {
m_ListCtrl.InsertItem(nt,strTemp, 0);
/* CString t;
t.Format("%d",nt);
MessageBox(t);*/
nt++;
// }
a.Detach();
uj5u.com熱心網友回復:
uj5u.com熱心網友回復:
怎么更新一次前面的保存不變啊轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/102531.html
標籤:圖形處理/算法
