I wish to change the background and foreground colour of 4 labels on a dialog.
I can use OnCtlColor, but it changes all the static text and Check boxes on the dialog.
i.e.
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor == CTLCOLOR_STATIC)
{
//if(g_pTabFiveDlg->GetDlgItem (
pDC->SetBkColor(BLACK_BRUSH);
pDC->SetTextColor(RGB(255,255,0));
return (HBRUSH)GetStockObject(BLACK_BRUSH);
}
How can I just arrange for specific labels to be affected?
I can use OnCtlColor, but it changes all the static text and Check boxes on the dialog.
i.e.
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor == CTLCOLOR_STATIC)
{
//if(g_pTabFiveDlg->GetDlgItem (
pDC->SetBkColor(BLACK_BRUSH);
pDC->SetTextColor(RGB(255,255,0));
return (HBRUSH)GetStockObject(BLACK_BRUSH);
}
How can I just arrange for specific labels to be affected?