靠山类源代码:CClockBackground::~CClockBackground(){}voidCClockBackground::Draw(CDC*pDC){ CPenpenMain(PS_SOLID,1,m_crMain),penOther(PS_SOLID,1,m_crOther); CBrushbrMain(m_crMain),brOther(m_crOther); CPen*pOldPen=pDC->SelectObject(&penOther); CBrush*pOldBrush=pDC->SelectObject(&brMain); CPointptCenter=m_rcRegion.CenterPoint(); intnRadius=m_nRadius-8; for(inti=0;iEllipse(rcDot); } pDC->SelectObject(&penMain); pOldBrush=pDC->SelectObject(&brOther); for(i=0;iRectangle(rcDot); } pDC->SelectObject(pOldPen); pDC->SelectObject(pOldBrush);}
1