修改控件的背景颜色,需要添加消息
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
ON_WM_CTLCOLOR()
HBRUSH CPC21Dlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
int id =::GetDlgCtrlID(pWnd->m_hWnd);//取得ID
if(id == IDC_EDIT16)
{
COLORREF bkColor = 0xC6FD0A;
CRect rcRec