Change windows taskbar Icon background color



I want to set my program task icon background color to red indicating an error has occurred.

Like in the pic in this link: https://ddgobkiprc33d.cloudfront.net/dd9d52c8-3fbe-436b-8845-a8bb9503ff22.png

I have been told that I have to call win32 api but haven't yet found it.

Any help is appreciated. Thanks!
Last edited on
@coder777

It requires more work than what I was expecting though.

Thank you.
You can use the system() function in <stdlib.h>, like so:
system ("color 3");

Here's a list of color codes:
https://ss64.com/nt/color.html

Hope this helps!
max

Note: these are for Windows only; they will not work on a Mac, Unix, or Linux, as as far as I know. For those, you will need to use commands specific to your OS.
@agent max

system ("color 3"); is for console text. it doesn't relate to the question in the op.

see https://ddgobkiprc33d.cloudfront.net/dd9d52c8-3fbe-436b-8845-a8bb9503ff22.png for what I wanted to achieve
Ah, I see. I don't have Windows, so I couldn't test it. Sorry about that, I thought it might be what you were looking for. I have no idea how to do that, either on Windows or macOS.

But good luck!
@agent max

Thanks anyway.
Topic archived. No new replies allowed.