如何管理任务栏上的应用程序图标?

How to manage the application icon on the taskbar?

简介:
OS: Windows 10
DPI:96

我得到了我的应用程序的推荐尺寸小 (16x16) 和大 (32x32) 图标的指标,调用 SetClassLong 函数来设置他。一切正常! 但!!启动应用程序后,任务栏中显示的图标大小为24x24。
为什么这么大?我只设置了推荐的 16x16 和 32x32?如何控制任务栏中的真实图标(调用SetOverlayIcon除外)

How can I give the system a 24x24 icon (which one should it be for other dpi?) If the metric request recommends me 16x16 and 32x32?

忘了 GetSystemMetrics() 因为它已经很久没有更新了。要提供 Windows 10 用于在任务栏上显示的 24x24 图标,只需将 WNDCLASShIcon 成员设置为此类图标即可。