The TCM_REMOVEIMAGE message removes an image from a tab control’s image list. You can send this message explicitly or by using the TabCtrl_RemoveImage macro.
TCM_REMOVEIMAGE wParam = (WPARAM) (int) iImage; // index of the image to remove lParam = 0; // not used; must be zero
No return value.
The tab control updates each tab’s image index, so each tab remains associated with the same image it had been.