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.
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "MouseToolText.h"
|
|
|
|
|
#include "GlobalFunction.h"
|
|
|
|
|
#include "GlobalDrawMgr.h"
|
|
|
|
|
#include "ObjTxt.h"
|
|
|
|
|
#include "CommandCreat.h"
|
|
|
|
|
#include "CommandMgr.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMouseToolText::CMouseToolText(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CMouseToolText::~CMouseToolText(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
void CMouseToolText::OnLButtonDown(UINT nFlags, CPoint point,CClientDC &dc)
|
|
|
|
|
{
|
|
|
|
|
Dbxy pt = gDraw->CPoint2Dbxy(point);
|
|
|
|
|
if(m_Status==_STATUS_1)
|
|
|
|
|
{
|
|
|
|
|
CObjTxt *p = new CObjTxt;
|
|
|
|
|
p->SetPosition(pt);//<2F><><EFBFBD>û<EFBFBD><EFBFBD><D7BC>
|
|
|
|
|
p->SetUseCurFontName();//ʹ<>õ<EFBFBD>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>
|
|
|
|
|
p->Creat();
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
m_Status = _STATUS_END;
|
|
|
|
|
OperateOver();
|
|
|
|
|
}
|