IImageList interface
Applies to: desktop apps only
Exposes methods that manipulate and interact with image lists.
To use IImageList, specify Comctl32.dll version 6 in the manifest. If you do not do this, Comctl32.dll version 5 will be used by default, with which IImageList could display unpredictable behavior. For more information on manifests, see Enabling Visual Styles.
Members
The IImageList interface inherits from the IUnknown interface. IImageList also has these types of members:
Methods
The IImageList interface has these methods.
| Method | Description |
|---|---|
| Add |
Adds an image or images to an image list. |
| AddMasked |
Adds an image or images to an image list, generating a mask from the specified bitmap. |
| BeginDrag |
Begins dragging an image. |
| Clone |
Clones an existing image list. |
| Copy |
Copies images from a given image list. |
| DragEnter |
Locks updates to the specified window during a drag operation and displays the drag image at the specified position within the window. |
| DragLeave |
Unlocks the specified window and hides the drag image, which enables the window to update. |
| DragMove |
Moves the image that is being dragged during a drag-and-drop operation. This function is typically called in response to a WM_MOUSEMOVE message. |
| DragShowNolock |
Shows or hides the image being dragged. |
| Draw |
Draws an image list item in the specified device context. |
| EndDrag |
Ends a drag operation. |
| GetBkColor |
Gets the current background color for an image list. |
| GetDragImage |
Gets the temporary image list that is used for the drag image. The function also retrieves the current drag position and the offset of the drag image relative to the drag position. |
| GetIcon |
Creates an icon from an image and a mask in an image list. |
| GetIconSize |
Gets the dimensions of images in an image list. All images in an image list have the same dimensions. |
| GetImageCount |
Gets the number of images in an image list. |
| GetImageInfo |
Gets information about an image. |
| GetImageRect |
Gets an image's bounding rectangle. |
| GetItemFlags |
Gets the flags of an image. |
| GetOverlayImage |
Retrieves a specified image from the list of images used as overlay masks. |
| Merge |
Creates a new image by combining two existing images. This method also creates a new image list in which to store the image. |
| Remove |
Removes an image from an image list. |
| Replace |
Replaces an image in an image list with a new image. |
| ReplaceIcon |
Replaces an image with an icon or cursor. |
| SetBkColor |
Sets the background color for an image list. This method only functions if you add an icon to the image list or use the IImageList::AddMasked method to add a black and white bitmap. Without a mask, the entire image draws, and the background color is not visible. |
| SetDragCursorImage |
Creates a new drag image by combining the specified image, which is typically a mouse cursor image, with the current drag image. |
| SetIconSize |
Sets the dimensions of images in an image list and removes all images from the list. |
| SetImageCount |
Resizes an existing image list. |
| SetOverlayImage |
Adds a specified image to the list of images used as overlay masks. An image list can have up to four overlay masks in Common Controls version 4.70 and earlier, and up to 15 in version 4.71 or later. The method assigns an overlay mask index to the specified image. |
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/6/2012