X
sorry aber jetzt zeigt er das net mehr im ListCtrl an.
CBitmap bitmap;
bitmap.LoadBitmap(IDB_BITMAP1);
BITMAP bm;
bitmap.GetObject(sizeof(bm), &bm);
CDC speicherDC;
speicherDC.CreateCompatibleDC(GetDC());
speicherDC.SelectObject(&bitmap);
CDC BmpDC;
CBitmap KleinesBmp;
KleinesBmp.CreateCompatibleBitmap(GetDC(),16,16);
BmpDC.CreateCompatibleDC(GetDC());
BmpDC.SelectObject(&KleinesBmp);
BmpDC.StretchBlt(0, 0,16,16,&speicherDC, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
bitmap.CreateCompatibleBitmap(GetDC(),16,16);
m_ImageList.Create(64,64,0,8,8);
m_ImageList.Add(&KleinesBmp, RGB(0,0,0));
CListCtrl * pListCtrl = (CListCtrl*) GetDlgItem(IDC_LIST1);
pListCtrl->SetImageList(&m_ImageList,LVSIL_NORMAL);
pListCtrl->InsertItem(0,"kjhjkh",0);
pListCtrl->InsertItem(0,"hallo",0);