需要响应WM_ERASEBKGND消息,并加入如下代码:
//当窗口背景更新时重新设置背景 CRect m_Rect; GetClientRect(&m_Rect); CBrush m_Brush; m_Brush.CreateSolidBrush(RGB(0,0,0)); pDC->FillRect(&m_Rect,&m_Brush); //return CFormView::OnEraseBkgnd(pDC); return TRUE; //注意这里一定要返回TRUE
QQ:819543772
EMail:wuchunlei@163.com