这个很有意思!
下面的代码显示的结果是一样的:(1),
void CMyView::OnDraw(CDC* pDC)
{
CMyDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CBrush brush(HS_DIAGCROSS,RGB(255,0,0));
pDC->SelectObject(&brush);
pDC->SetBkMode(OPAQUE));
pDC->Ellipse(200,200,400,400);
}
(2),
void CMyView::OnDraw(CDC* pDC)
{
CMyDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
CBrush brush(HS_DIAGCROSS,RGB(255,0,0));
pDC->SelectObject(&brush);
pDC->SetBkMode(TRANSPARENT);
pDC->Ellipse(200,200,400,400);
}
输出的结果是一样的,这个怎么解释?