Changing text color of radio buttons and group boxes
OK this is stupid and probably has been answered a hundred times, but I've searched and I can't seem to find the answer.
I have a dialog based app with a dark background. I want to set all the text in the dialog to a light color so it can be seen against the dark background. So far I've done this for most controls using this code...
Code:
HBRUSH CMyAppDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
switch (nCtlColor)
{
case CTLCOLOR_BTN:
case CTLCOLOR_DLG:
return CreateSolidBrush(BACKGROUND_COLOR);
case CTLCOLOR_STATIC:
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(TEXT_COLOR);
return CreateSolidBrush(BACKGROUND_COLOR);
default:
return CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
}
}
However the radio buttons and group box labels change their background color but not their text color. Am I missing something obvious here?
Attached is a small screen shot of what I'm getting. As you can see the standard labels (i.e. Fade-in and Fade-out) change color correctly, but the group box labels and radio button text do not.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.