BOOL CViewMyTypeView::OnEraseBkgnd(CDC* pDC) 
{
HBRUSH hBrush, hOldBrush;
LOGBRUSH logBrush;
COLORREF colRef = 0x00000000; //小弟不知道如何去给COLORREF 赋值 logBrush.lbColor = colRef;
logBrush.lbHatch = HS_HORIZONTAL|HS_VERTICAL;
logBrush.lbStyle = BS_SOLID; hBrush = (HBRUSH)CreateBrushIndirect (&logBrush); 
hOldBrush = (HBRUSH)SelectObject (pDC->m_hDC, hBrush);
RECT rc;
GetClipBox (pDC->m_hDC, &rc);
PatBlt (pDC->m_hDC, rc.left, rc.top, rc.left-rc.right, rc.bottom-rc.top, PATCOPY);
SelectObject (pDC->m_hDC, hOldBrush);
DeleteObject (hBrush);
return true;}结果背景没有变成黑的,而是没有背景了, 完全透明的了,上面的代码哪个位置发生错误?谢谢!!