ListView_SetImageList macro (commctrl.h)
Assigns an image list to a list-view control. You can use this macro or send the LVM_SETIMAGELIST message explicitly.
HIMAGELIST ListView_SetImageList(
HWND hwnd,
HIMAGELIST himl,
int iImageList
);
hwnd
Type: HWND
A handle to the list-view control.
himl
Type: HIMAGELIST
A handle to the image list to assign.
iImageList
Type: int
The type of image list. This parameter can be one of the following values:
Value | Meaning |
---|---|
|
Image list with large icons. |
|
Image list with small icons. |
|
Image list with state images. |
|
Image list for group header. |
Type: HIMAGELIST
Returns the handle to the image list previously associated with the control if successful, or NULL otherwise.
The current image list will be destroyed when the list-view control is destroyed unless the LVS_SHAREIMAGELISTS style is set. If you use this message to replace one image list with another, your application must explicitly destroy all image lists other than the current one.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | commctrl.h |