Is there a Windows API for adding badges to taskbar icons?

倾然丶 夕夏残阳落幕 提交于 2019-11-29 04:03:09

问题


Spotify recently added a feature where the taskbar icon would have a red iOS-style badge with the number of songs in your inbox.

The badge itself is definitely part of the icon, but I was wondering if the number might be added with an official API.

If not, how might they be doing it? I've never had more than a few songs in my inbox, so maybe it just doesn't shows 1-9 and then 10+ or something, or could they be dynamically creating the image and setting it as the icon?

I wasn't aware you could change the icon while the app is running.


回答1:


ITaskBarList3::SetOverlayIcon is what you're looking for.



来源:https://stackoverflow.com/questions/7852873/is-there-a-windows-api-for-adding-badges-to-taskbar-icons

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