CImageList::FromHandlePermanent
Returns a pointer to a CImageList object when given a handle to an image list.
static CImageList* PASCAL FromHandlePermanent(
HIMAGELIST hImageList
);
Parameters
- hImageList
Specifies the image list.
Return Value
A pointer to a CImageList object if successful; otherwise NULL.
Remarks
If a CImageList object is not attached to the handle, NULL is returned.
Example
CImageList* ConvertHandlePermanent(HIMAGELIST hmyImageList)
{
// Convert the HIMAGELIST to a CImageList*.
ASSERT(hmyImageList != NULL);
CImageList* pmyImageList = CImageList::FromHandlePermanent(hmyImageList);
ASSERT(pmyImageList != NULL);
return pmyImageList;
}
Requirements
Header: afxcmn.h