Link to home
Start Free TrialLog in
Avatar of cybeh
cybeh

asked on

Need to change color for --> ::GetSysColor(COLOR_BTNFACE)

Hi, I do have a line of code like this

pDC->FillSolidRect(rcLeftGutter, ::GetSysColor(COLOR_BTNFACE));

I need to change the GetSysColor(COLOR_BTNFACE) to &H00E7E7E6&

Is there any possible way to do so?

I am really newbiew to MFC. Sorry if this question is too stupid for you guys.

Please advice. Thanks in advance.
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I guess it would be:
pDC->FillSolidRect(rcLeftGutter, RGB(0xE7,0xE7,0xE6));
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cybeh
cybeh

ASKER

Thanks...That's what I need.
Avatar of cybeh

ASKER

Sorry jaime....jkr answer the question 1st.
Avatar of cybeh

ASKER

Ooops...

RGB(E7,E7,E6) not equal to &H00E7E7E6&

RGB need to be in 0 - 255
the euqalvalant of &H00E7E7E6& is GRB ( 231, 231, 230)
So, tell me:
Does pDC->FillSolidRect(rcLeftGutter, RGB(E7,E7,E6)) works anyway?
Is pDC->FillSolidRect(rcLeftGutter, 0x00E7E7E6) what you need?
Avatar of cybeh

ASKER

Is that still possible to split the point 50% of the points to jaime? Seems like he gave the most accurate answer.
Yes, you can, I will tell Community Support
No objections against a split :o)

What a pity a PE can't do that, so I would.
Avatar of cybeh

ASKER

Actually both method works fine.

pDC->FillSolidRect(rcLeftGutter, GRB ( 231, 231, 230))
pDC->FillSolidRect(rcLeftGutter, 0x00E7E7E6)

Just that, the 2nd method might give more accurate color (I tried few color and sometimes, there are some mismatch if using the RGB method)