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.
37 lines
942 B
C++
37 lines
942 B
C++
#include "StdAfx.h"
|
|
#include "MouseToolBarCode.h"
|
|
#include "GlobalFunction.h"
|
|
#include "GlobalDrawMgr.h"
|
|
#include "ObjBarCode.h"
|
|
#include "CommandCreat.h"
|
|
#include "CommandMgr.h"
|
|
|
|
|
|
CMouseToolBarCode::CMouseToolBarCode(void)
|
|
{
|
|
}
|
|
CMouseToolBarCode::~CMouseToolBarCode(void)
|
|
{
|
|
}
|
|
void CMouseToolBarCode::OnLButtonDown(UINT nFlags, CPoint point,CClientDC &dc)
|
|
{
|
|
Dbxy pt = gDraw->CPoint2Dbxy(point);
|
|
if(m_Status==_STATUS_1)
|
|
{
|
|
CObjBarCode *p = new CObjBarCode;
|
|
p->SetPosition(pt);//设置基准点
|
|
p->SetUseCurFontName();//使用当前字体
|
|
p->Creat();
|
|
CLayer &layer = GetLayerInstance();
|
|
|
|
CObjContainer Container;
|
|
Container.AddObject(p);
|
|
//创建撤销指令-------start
|
|
CCommandCreat *pCmd = new CCommandCreat;
|
|
gCommandMgr.AddUndoCommand(pCmd,Container.GetObjVec());
|
|
pCmd->Excute();
|
|
}
|
|
//结束
|
|
m_Status = _STATUS_END;
|
|
OperateOver();
|
|
} |