CTreeCtrl::GetImageList

CImageList* GetImageList( UINT nImage );

Return Value

Pointer to the control’s image list if successful; otherwise NULL.

Parameters

nImage

Type of image list to retrieve. The image list can be one of the following values:

Remarks

Call this function to retrieve the handle of the normal or state image list associated with the tree view control. Each item in a tree view control can have a pair of bitmapped images associated with it. One image is displayed when the item is selected, and the other is displayed when the item is not selected. For example, an item might display an open folder when it is selected and a closed folder when it is not selected.

For more information on image lists, see the CImageList class.

Example

// The pointer to my tree control.
extern CTreeCtrl* pmyTreeCtrl;
// The new image list of the tree control.
extern CImageList* pmyImageList;

ASSERT(pmyTreeCtrl->GetImageList(TVSIL_NORMAL) == NULL);

pmyTreeCtrl->SetImageList(pmyImageList, TVSIL_NORMAL);
ASSERT(pmyTreeCtrl->GetImageList(TVSIL_NORMAL) == pmyImageList);

CTreeCtrl OverviewClass MembersHierarchy Chart

See Also   CImageList, CTreeCtrl::SetImageList