You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
814 B
C++

#include "StdAfx.h"
#include "MouseToolOnePoint.h"
#include "GlobalFunction.h"
#include "GlobalDrawMgr.h"
#include "CommandCreat.h"
#include "ObjPoint.h"
#include "CommandMgr.h"
CMouseToolOnePoint::CMouseToolOnePoint(void)
{
}
CMouseToolOnePoint::~CMouseToolOnePoint(void)
{
}
void CMouseToolOnePoint::OnLButtonDown(UINT nFlags, CPoint point,CClientDC &dc)
{
Dbxy pt = gDraw->CPoint2Dbxy(point);
if(m_Status==_STATUS_1)
{
CObjPoint *p = new CObjPoint;
p->SetPt(pt);//<2F><><EFBFBD>û<EFBFBD>׼<EFBFBD><D7BC>
CObjContainer Container;
Container.AddObject(p);
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8>-------start
CCommandCreat *pCmd = new CCommandCreat;
gCommandMgr.AddUndoCommand(pCmd,Container.GetObjVec());
pCmd->Excute();
}
GetCurViewPtr()->RefreshView();
}