HBRUSH 类名::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CFormView::OnCtlColor(pDC, pWnd, nCtlColor); //明明没用,但没有它也不行,很奇怪!
if (pWnd-GetDlgCtrlID()==IDC_STATIC_×××)
{
pDC-SetTextColor(RGB(0,0,255)); //蓝色字体
pDC-SelectObject(&m_font); //设置已设置的字体
}
return m_brush;
}(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/bianchengyuyan/)结果: