19,464
社区成员
发帖
与我相关
我的任务
分享
void CLineView::OnDraw(CDC* pDC)
{
CLineDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
Graphics graphics(*pDC);
Pen myPen(Color::Red);
myPen.SetWidth(2);
graphics.DrawLine(&myPen, 0, 0, 200, 300);
}
void CLineView::OnDraw(CDC* pDC)
{
CLineDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
Graphics graphics(pDC->m_hDC);
Pen myPen(Color(255,255,0,0),1);
myPen.SetWidth(2);
graphics.DrawLine(&myPen, 0, 0, 200, 300);
}