기본 콘텐츠로 건너뛰기

라벨이 ImageList인 게시물 표시

이미지 리스트에서 하나의 비트맵 이미지를 가져오는 ..

당신은 소중한 사람이 있나요? | 바람전설 http://blog.naver.com/pkl95/40008086966 void GetImageFromList(CImageList *lstImages, int nImage, CBitmap *destBitmap) { //First we want to create a temporary image list we can manipulate CImageList tmpList; tmpList.Create(lstImages); //Then swap the requested image to the first spot in the list tmpList.Copy( 0, nImage, ILCF_SWAP ); //Now we need to get som information about the image IMAGEINFO lastImage; tmpList.GetImageInfo(0,&lastImage); //Heres where it gets fun //Create a Compatible Device Context using //the valid DC of your calling window CDC dcMem; dcMem.CreateCompatibleDC (GetWindowDC()); //This rect simply stored the size of the image we need CRect rect (lastImage.rcImage); //Using the bitmap passed in, Create a bitmap //compatible with the window DC //We also know that the bitmap needs to be a certain size. destBitmap->CreateCompatibleBitmap (t...