是否有用于向任务栏图标添加徽章的 Windows API? [英] Is there a Windows API for adding badges to taskbar icons?

查看:36
本文介绍了是否有用于向任务栏图标添加徽章的 Windows API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Spotify 最近添加了一项功能,其中任务栏图标会有一个红色的 iOS 风格的徽章,上面显示收件箱中的歌曲数量.

徽章本身绝对是图标的一部分,但我想知道这个数字是否可以通过官方 API 添加.

如果没有,他们会怎么做?我的收件箱中从来没有超过几首歌曲,所以也许它只是不显示 1-9 然后是 10+ 或其他东西,或者他们可以动态创建图像并将其设置为图标?

我不知道您可以在应用运行时更改图标.

解决方案

ITaskBarList3::SetOverlayIcon 就是你要找的.

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.

解决方案

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

这篇关于是否有用于向任务栏图标添加徽章的 Windows API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆