Mfc笔记(2)onctrlcolor
BEGIN_MESSAGE_MAP(CtestDialogDlg, CDialog)
ON_WM_CTLCOLOR()
END_MESSAGE_MAP()
HBRUSH CtestDialogDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: 在此更改 DC 的任何属性
pDC->SetTextColor(RGB(255,0,0));
// TODO: 如果默认的不是所需画笔,则返回另一个画笔
//return hbr;
return m_hbrush;
}