控件颜色一
COLORREF m_crText;
CFont m_font;
m_font.CreatePointFont(150,"华文行楷");//代表15号字体,华文行楷
HBRUSH dlg::CtlColor(CDC* pDC, UINT nCtlColor, Cwnd* pWnd)
{
HBRUSH hbr = CDialogEx::OnCtlColor(pDC, pWnd, nCtlColor);
if(pWnd->GetDlgCtrlID()== IDC)
{
}
if (CTLCOLOR_STATIC == nCtlColor)
{
pDC->SelectObject(&m_font);
pDC->SetTextColor(m_crText);
pDC->SetBkColor(NULL_BRUSH);
pDC->SetBkMode(TRANSPARENT);
return (HBRUSH)GetStockObject(NULL_BRUSH);
}
return hbr;
}