CImageList::Attach
Llame a esta función para asociar una lista de imágenes a un objeto de CImageList .
BOOL Attach(
HIMAGELIST hImageList
);
Parámetros
- hImageList
Un identificador a un objeto de la lista de imágenes.
Valor devuelto
Distinto de cero si los datos adjuntos se logra; si no 0.
Ejemplo
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();
}
Requisitos
encabezado: afxcmn.h