Each tab can have an icon associated with it. An index specifies the icon into the image list for the tab control. When you create a tab control, it has no image list associated with it. You can use the ImageList_Create function to create an image list. You can assign it to a tab control by using the TCM_SETIMAGELIST message.
You can add an image to a tab control's image list just as you would add one to any other image list. To ensure that each tab remains associated with its assigned image, remove images by using the TCM_REMOVEIMAGE message instead of the ImageList_Remove function.
Because destroying a tab control does not destroy an image list that is associated with it, you must destroy the image list separately. Retaining the image list may be useful if you want to assign the same image list to multiple tab controls.
To retrieve the handle of the image list currently associated with a tab control, you can use the TCM_GETIMAGELIST message.