(add this function to your class)
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);.cpp file
// Called to change color of text
(add this to your message map)
ON_WM_CTLCOLOR()(add this to the file too)
HBRUSH CYourDialog::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{// Call original functions
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// Create a blue color
COLORREF textColor = RGB(0, 0, 255);
// Set text color
if (pWnd->GetDlgCtrlID() == yourstatic)
{pDC->SetTextColor(textColor);
}
// Return result of original function
return hbr;
}