How do I undo SetSysColors()?

748 Views Asked by At

So I executed:

int elements[2] = {COLOR_HIGHLIGHT,COLOR_HIGHLIGHTTEXT};
DWORD newColors[2];

newColors[0] = Color::IndianRed.ToArgb();
newColors[1] = Color::Maroon.ToArgb();

SetSysColors(2,elements,newColors);

I thought it might do what I hoped it wouldn't.. but it did so now everything I select looks like this:

enter image description here

What are the default values for my system to set it back to how it was? I am running Windows 10.

1

There are 1 best solutions below

1
On BEST ANSWER

Quoting MSDN:

However, this function affects only the current session. The new colors are not saved when the system terminates.

Just reboot your machine.