0

I want to create multiple icon overlay handlers in order to change the overlay icon of a file based on its status. I'm looking for a way to implement all handlers in the same dll. accoring to GetOverlayInfo documentation I must return the same icon each time this function is called. so what icon should I return in my multi-handlers dll when GetOverlayInfo is called? how do I supply a different icon according to the file's status?

(I browsed through the source code of TortoiseOverlays project, and it seems to return different icon each time GetOverlayInfo is called based on the state. how come?)

elad-ep
  • 333
  • 1
  • 9
  • GetOverlayInfo() only registers the overlay that you want to use, it is added to the system image list and cannot be changed after that. Use IsMemberOf() to make the overlay selective to a particular file. The CShellExt::GetOverlayInfo() function is common for the nine different shell extensions that TortoiseOverlays registers, that's why you see it return different icons. – Hans Passant Apr 22 '15 at 08:22

1 Answers1

1

You must create several handlers with different CLSID in single dll. And every handler will return only one icon. This is the only way.

Denis Anisimov
  • 3,297
  • 1
  • 10
  • 18