다음을 통해 공유


CImageList::Attach

이 이미지 목록에 첨부 하려면이 함수를 호출 하는 CImageList 개체입니다.

BOOL Attach(
   HIMAGELIST hImageList 
);

매개 변수

  • hImageList
    이미지 목록 개체에 대 한 핸들입니다.

반환 값

첨부 파일이 성공적 이면 0이 아닌. 그렇지 않으면 0입니다.

예제

void AddQuestion(HIMAGELIST hmyImageList)
{
   CImageList imgList;

   // Attach the image list handle to the CImageList object.
   imgList.Attach(hmyImageList);

   // Add a new icon to the image list.
   imgList.Add(AfxGetApp()->LoadStandardIcon(IDI_QUESTION));

   // Detach the handle from the CImageList object.
   imgList.Detach();
}

요구 사항

헤더: afxcmn.h

참고 항목

참조

CImageList 클래스

계층 구조 차트

CImageList::Detach

CImageList::GetSafeHandle