开发者

How to get taskbar background color

开发者 https://www.devze.com 2023-01-12 12:11 出处:网络
I have notifyIcon located at the notifyArea of the Win7 taskbar. This Icon contain dynamic t开发者_开发技巧ext info - Black text on the trasparent bitmap.

I have notifyIcon located at the notifyArea of the Win7 taskbar. This Icon contain dynamic t开发者_开发技巧ext 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)


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:

  1. 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.

  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消