void CGdi1View::OnDraw(CDC* pDC)
{
CGdi1Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
Graphics graphics(pDC->m_hDC);
Pen newpen(Color(255,0,0),3);
newpen.SetWidth(10);
newpen.SetStartCap(LineCapRound);//起点线冒
newpen.SetEndCap(LineCapRound);//终点线冒
graphics.DrawLine(&newpen,20,10,200,100);
// TODO: add draw code for native data here
}
转载于:https://www.cnblogs.com/lkgosurlfing/archive/2009/05/15/1457914.html