[每日一码] Arx响应双击事件
#include "stdafx.h"#include "DoubleClickWinsill.h"
#include "tyWinsillCom.h"
CDoubleClickWinsill::CDoubleClickWinsill(void)
{
}
CDoubleClickWinsill::~CDoubleClickWinsill(void)
{
}
void CDoubleClickWinsill::startEdit(AcDbEntity *pEnt, AcGePoint3d pt)
{
//acutPrintf(采用T("123\n"));
if(pEnt->isKindOf(tyWinsillCom::desc()))
{
tyWinsillCom* pWinsill = tyWinsillCom::cast(pEnt);
//获取当前文档
AcApDocument *pDoc = acDocManager->curDocument();
//锁文档
acDocManager->lockDocument(pDoc);
//升级为可写
pWinsill->upgradeOpen();
pWinsill->setDir(pWinsill->getDir() * (-1));
pWinsill->close();
pWinsill->draw(); //在关闭之后还能使用
//解锁文档
acDocManager->unlockDocument(pDoc);
//清理PickFirst选择集中的内容
acedSSSetFirst(NULL, NULL);
}
}
void CDoubleClickWinsill::finishEdit(void)
{
}
页:
[1]