Using my icon as IconOverlay for Shell Namespace

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi ALl,<br/><br/>I need to display icon overlay for my files and folders in my Shell NSE. I am facing trouble showing my icon as overlay. I implemented both IShellIconOverlayIdentifiers and IShellIconOverlay. It does not always work as it depends on whether icon specified in IShellIconOverlayIdentifiers get loaded first before my NSE is called. <br/><br/>If I access my NSE first, I got old system image list, where the my icon is not in the overlay list. A call to SHGetIconOverlayIndex("myNSE.dll", 0) will return -1. <br/><br/>If my IShellIconOverlayIdentifiers is called first i.e. by going to a folder where a file that matches the criteria set by IShellIconOverlayIdentifiers::isMemberof() before accessing my NSE, then my NSE will have the system image list with my icon. A call to SHGetIconOverlayIndex("myNSE.dll", 0) will succeed and return correct index. <br/><br/>How do I solve this problem? I need to get the icon loaded into system image list.<br/><br/>I tried by getting handle to system image list ( SHGetImageList(&sysImageList)) and then call sysImageList->replaceicon(-1/*this will add*/, hIcon) and then sysImageList->setOverlayImage(). Nothing happens. <br/><br/>Best regards,

View the full article
 
Back
Top