标题:[求助]请教关于内存绘图
只看楼主
xiaoyanwang661
Rank: 1
等 级:新手上路
帖 子:15
专家分:0
注 册:2006-6-18
 问题点数:0 回复次数:0 
[求助]请教关于内存绘图

我有一段鼠标随手绘图的程序(屏幕绘图),现在想实现内存绘图,但是不知道程序应该怎么写,写在哪里,请大家帮忙

void CNotepadView::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
m_bDraw=TRUE;
xTemp = point.x;
yTemp = point.y;

CEditView::OnLButtonDown(nFlags, point);
}

void CNotepadView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
m_bDraw=FALSE;
CEditView::OnLButtonUp(nFlags, point);
}

void CNotepadView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CPoint *pt;
CDC *pDC=GetDC();
HCURSOR m_HCross;
m_HCross=AfxGetApp()->LoadStandardCursor(IDC_CROSS);
SetCursor(m_HCross);
//鼠标画线
if(m_bDraw==TRUE)
{
CClientDC dc(this);
dc.MoveTo (xTemp,yTemp);
dc.LineTo (point.x,point.y);
xTemp = point.x;
yTemp = point.y;
pt = new CPoint(point.x,point.y);
m_ptrArray.Add(pt);
}
ReleaseDC(pDC);
CEditView::OnMouseMove(nFlags, point);
}

搜索更多相关主题的帖子: 内存 绘图 
2006-07-29 14:43



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-80928-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.536000 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved