HBRUSH CTempDetDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Change any attributes of the DC here if(pWnd->GetDlgCtrlID()==IDC_STA1) //group box's id { pDC->SetBkColor(BLACK); pDC->SetTextColor(RED); pDC->SetBkMode(TRANSPARENT); hbr = (HBRUSH)m_brush; } return hbr; } CBrush m_brush; m_brush.CreateSolidBrush(BLACK);
wrote:I use VS2008, and default caption color of group box is blue. I want to change blue color to black color.
wrote:pDC->SetTextColor(RED);
RED
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)