16,471
社区成员
发帖
与我相关
我的任务
分享
HBRUSH zdjc::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor==CTLCOLOR_EDIT)
{
const MSG *msg=GetCurrentMessage();
if((HWND)msg-> lParam==GetDlgItem(IDC_EDIT1)->GetSafeHwnd())
pDC-> SetBkColor(RGB(255,255,0));
}
// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not desired
return hbr;
}