Get information about hidden tray icons in windows7

余生长醉 提交于 2019-12-11 06:19:01

问题


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 ?


回答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.




回答2:


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.



来源:https://stackoverflow.com/questions/6947705/get-information-about-hidden-tray-icons-in-windows7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!