[EXPLORER]

* Remove old icons from the tray imagelist.

svn path=/trunk/; revision=68893
This commit is contained in:
David Quintana 2015-09-01 12:32:05 +00:00
parent 4a52a2ec13
commit 332652615a

View file

@ -163,8 +163,14 @@ public:
if (iconData->uFlags & NIF_ICON)
{
TBBUTTONINFO tbbiOld = { 0 };
tbbiOld.cbSize = sizeof(tbbiOld);
tbbiOld.dwMask = TBIF_BYINDEX | TBIF_IMAGE;
GetButtonInfo(index, &tbbiOld);
tbbi.dwMask |= TBIF_IMAGE;
tbbi.iImage = ImageList_AddIcon(m_ImageList, iconData->hIcon);
tbbi.iImage = ImageList_ReplaceIcon(m_ImageList, tbbiOld.iImage, iconData->hIcon);
}
if (iconData->uFlags & NIF_TIP)
@ -209,6 +215,14 @@ public:
if (index < 0)
return FALSE;
TBBUTTONINFO tbbiOld = { 0 };
tbbiOld.cbSize = sizeof(tbbiOld);
tbbiOld.dwMask = TBIF_BYINDEX | TBIF_IMAGE;
GetButtonInfo(index, &tbbiOld);
ImageList_Remove(m_ImageList, tbbiOld.iImage);
DeleteButton(index);
if (!(notifyItem->dwState & NIS_HIDDEN))