Share via


Using an Image List

Typical usage of an image list follows the pattern below:

  • Construct a CImageList object and call one of the overloads of its Create function to create an image list and attach it to the CImageList object.

  • If you didn't add images when you created the image list, add images to the image list by calling the Add or Read member function.

  • Associate the image list with a control by calling the appropriate member function of that control, or draw images from the image list yourself using the image list's Draw member function.

  • Perhaps allow the user to drag an image, using the image list's built-in support for dragging.

Note

If the image list was created with the new operator, you must destroy the CImageList object when you are done with it.

See Also

Reference

Using CImageList

Concepts

Controls (MFC)