Home > Back-end >  C Change Default accent color using winapi
C Change Default accent color using winapi

Time:10-10

I was wondering how to change the accent color in C , can anyone provide me some code. I did some investigating but I couldn't find anything. If somebody doesn't know what I'm talking about , here is a imgur link showing what setting I'm trying to change.

Thanks in advance!

CodePudding user response:

The principle of applying accent color to button, underline and background color is analogous. I can write a sample for your reference. For example, set the color of the brush to yellow. Set the color parameter of SetDCBrushColor(), call RGB and input the parameter.

SetDCBrushColor(hdc, RGB(0xFF, 0xFF, 00));

Also RGB(0xFF, 0x00, 00) is red. However, this SetDCBrushColor() APi cannot be used directly. You also need to set a window to draw, obtain the context, handle, etc.

CodePudding user response:

  1. .12!%#

  • Related