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:
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.
精彩评论