1、使用区域绘制图形:
CBrush *oldbrush;
CBrush brush(RGB(0,0,0));
oldbrush=pDC->SelectObject(&brush);
CRgn rgn1,rgn2;
rgn1.CreateEllipticRgn(150,150,350,350);//画大圆,圆心(250,250),半径100
rgn2.CreateEllipticRgn(100,100,340,340);
rgn1.CombineRgn(&rgn1,&rgn2,RGN_DIFF);
pDC->FrameRgn(&rgn1,&brush,2,2);
pDC->SelectObject(&oldbrush);