Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Call this function to attach an image list to a CImageList object.
BOOL Attach(
HIMAGELIST hImageList
);
Parameters
- hImageList
A handle to an image list object.
Return Value
Nonzero if the attachment was successful; otherwise 0.
Example
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();
}
Requirements
Header: afxcmn.h