description | title | ms.date | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|
Learn more about: Using an Image List |
Using an Image List |
11/04/2016 |
|
e0aed188-a1e6-400e-9f51-033d61c5541f |
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.