How to change the color of a button background
I am using a Class CxTargetButton for the buttons in my Dialog,
Now even afetr tryuing to use Message reflection, the background color of the buttons is not changing.
I can see the following method being called
HBRUSH CxTargetButton::CtlColor(CDC* p_DC, UINT nCtl)
{
p_DC->SetBkColor(RGB(255,255,255));
p_DC->SetTextColor(RGB(255,0,0));
return (HBRUSH)m_Brush;
}
But the background color is not changed to white as I want it to.
The method DrawItem has been overridden in the class, can that be causing this issue...
Pauli
I have some other controls there as well..
And I have tried the same for them but still nothing, they have the same grey background.
I am changing the background color of the Dialog in the dialogs CTLColor handler, and for rest of the controlls using CTLCOLOR reflection am trying to use CtlColor to change the color