有三种方法:
1 在CApp类内设定其颜色值
2 OnCtrlColor
2 OnEraserBkColor
BOOL CMy444Dlg::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
CBrush brush (RGB (128 , 0 , 128) );
CBrush* pOldBrush = pDC->SelectObject (&brush);
CRect reClip ;
pDC->GetClipBox (&reClip);
pDC-> PatBlt (reClip.left , reClip.top ,
reClip.Width ( ) , reClip.Height ( ) , PATCOPY );
pDC->SelectObject (pOldBrush );
return TRUE;
}
posted on 2007-11-27 14:37
石正 阅读(847)
评论(0) 编辑 收藏