I want to the change the textcolor of CMFCBUTTON in disabled state. Iam successfully able to change textcolor when button is in enable state. I tried below code which is mentioned in 'what have you tried section'
What I have tried:
bool var;
CMFCBUTTON * m_btn;
m_btn->EnableWindow(var)
if(var)
{
m_btn->SetFaceColor(RGB(0,255,0),true);
m_btn->SetTextColor(RGB(255,255,255));
}
else
{
m_btn->SetFaceColor(RGB(255,0,0),true);
m_btn->SetTextColor(RGB(33,33,33));
}
Here face color got changed in both enable and disable condition but text color got reflected only in enable condition.