Поделиться через


CImageList::Attach

Эта функция вызывается для приложения списка образа на объект CImageList.

BOOL Attach(
   HIMAGELIST hImageList 
);

Параметры

  • hImageList
    Дескриптор объекта списка образа.

Возвращаемое значение

Ненулевой если вложение прошло успешно; в противном случае – значение 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();
}

Требования

Header: afxcmn.h

См. также

Ссылки

Класс CImageList

Диаграмма иерархии

CImageList::Detach

CImageList::GetSafeHandle