如何获取任务栏背景颜色
我有notifyIcon位于Win7任务栏的notifyArea。 该图标包含动态文本信息 - 透明位图上的黑色文本。 因此,使用标准 Windows 主题(浅色)信息可读,但使用其他“深色”Windows 主题则不行。
我想获取任务栏背景颜色并最终用适当的颜色绘制图标(例如,如果任务栏颜色为深色,则为白色文本)
I have notifyIcon located at the notifyArea of the Win7 taskbar.
This Icon contain dynamic text info - Black text on the trasparent bitmap.
So, with Standard Windows theme (light) information readable but with other "dark" windows themes not.
I want to get taskbar background color and eventually draw Icon with appropriate color (ex White text if Dark taskbar color)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来你不是第一个尝试。
我认为,如果您不需要背景颜色,有两种选择:
添加文本边框或阴影。您可以通过首先在四个方向(边框)或阴影方向上绘制一个像素偏差的边框/阴影颜色文本来实现此目的。我建议在浅色文本周围使用黑色边框。
据我了解,Windows 图标支持反色,这与它所绘制的任何颜色相反。看起来不太好,但它们非常明显 - 我将它们用作光标。
希望这有帮助。
It seems that you are not the first to try.
I think that there are two alternatives, if you don't want a background colour:
Add a text border or shadow. You can do that by drawing the text in the border/shadow colour first with a one pixel deviation in the four directions (border) or in the shadow direction. I suggest a black border around light text.
As I understand windows icon support a reverse colour, which is the opposite of whatever colour it is painted on. Don't look nice but they are pretty visible - I am using them for my cursor.
Hope this helps.