user9444860
user9444860

Reputation:

In CTabCtrl can I change tab's icon during runtime

In CTabCtrl can I change tab's icon during runtime?

I have set imagelist to ctabctrl.

I just want to change the image index to particular tab during runtime? Is it possible?

Upvotes: 0

Views: 268

Answers (1)

Joseph Willcoxson
Joseph Willcoxson

Reputation: 6040

void SetTabImage(CTabCtrl* pCtrl, int nItem, int iImage)
{
    TCITEM tcitem;
    ZeroMemory(&tcitem, sizeof(tcitem);
    tcitem.mask = TCIF_IMAGE;
    tcitem.iImage = iImage;
    pCtrl->SetItem(nItem, &tcitem);
}

Upvotes: 2

Related Questions