15,979
社区成员
发帖
与我相关
我的任务
分享
void CTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
pDc = GetDC();
pDc->MoveTo(point);
}
void CTestView::OnLButtonUp(UINT nFlags, CPoint point)
{
pDc->LineTo(point);
}
void CMoveToView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
m_sPoint = point;
CView::OnLButtonDown(nFlags, point);
}
void CMoveToView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
m_pDc = GetDC();
m_pDc->MoveTo(m_sPoint);
m_pDc->LineTo(point);
ReleaseDC(m_pDc);
CView::OnLButtonUp(nFlags, point);
}
void CTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
m_ptStart = point;
}
void CTestView::OnLButtonUp(UINT nFlags, CPoint point)
{
CClientDC dc(this);
dc.MoveTo(m_ptStart);
dc.LineTo(point);
}
void CTestView::OnLButtonDown(UINT nFlags, CPoint point)
{
pDc = GetDC();
m_ptStart = point;
}
void CTestView::OnLButtonUp(UINT nFlags, CPoint point)
{
pDc->MoveTo(m_ptStart);
pDc->LineTo(point);
}