1

I am trying to get information on the system tray icons in windows 7. I am able to do so only on the visible icons in the 'User Promoted Notification Area' ToolBarWindow32. but how can I get information on the hidden icons ?

jacob
  • 1,397
  • 1
  • 26
  • 53

2 Answers2

1

There's no public interface to work with notification icons other than the ones you own. You can only do this by hacking and reverse engineering the shell.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • I am able to get information about the visible icons by getting a handle to the ToolBarWindow32 window and quarying buttons with Toolbar Control Messages. but I cant find the handle to the hidden icons window. – jacob Aug 05 '11 at 09:01
  • @jacob You are already hacking and using unpublished, unsupported implementation details. Microsoft explicitly does not want you to be interfering with the objects that belong to the user. You may disagree with their stance, but that is the reality of the situation. There quite possibly isn't a hidden icons window. – David Heffernan Aug 05 '11 at 09:03
0

There is an undocumented COM interface ITrayNotify for retrieving tray icons and changing their visibility, used by Explorer itself. See this link for full source: http://thread0.me/tag/windows/

Note that using an unofficial API is somewhat risky and this API in particular has introduced breaking changes with Windows 8. But hey, even Chrome uses this trick. Just be sure to handle failures properly.

blade
  • 12,057
  • 7
  • 37
  • 38