当前位置:网站首页>2021-10-13arx
2021-10-13arx
2022-07-28 10:15:00 【vv1025】
【 Reprint 】 Double click the entity to pop up the dialog box ( heavy load AcDbDoubleClickEdit)
// DoubleClickEdit.h: interface for the CDoubleClickEdit class.
//
//
//By freejsutin 2005-08-17
#include "AcDblClkEdit.h" //for dinfine AcDbDoubleClickEdit
#pragma comment (lib ,"AcDblClkEditPE.lib")
#include "actrans.h" //for dinfine actrTransactionManager
class CDoubleClickEdit : public AcDbDoubleClickEdit
{
public:
CDoubleClickEdit();
virtual ~CDoubleClickEdit();
void finishEdit(void);
void CDoubleClickEdit::startEdit(AcDbEntity *pEnt, AcGePoint3d clickpt);
private:
bool upgradeOpen(AcDbObject *pEnt);
};// DoubleClickEdit.cpp: implementation of the CDoubleClickEdit class.
//
//
#include "stdafx.h"
#include "autodrawing.h"
#include "DoubleClickEdit.h"
#include "DeviceAttribute.h"
void CDoubleClickEdit::finishEdit()
{
}// It's mainly this function that works , Realize the function you want in this function void CDoubleClickEdit::startEdit(AcDbEntity *pEnt, AcGePoint3d clickpt)
{
// Because you want to edit the entity , Lock the document first
AcApDocument *pDoc = acDocManager->curDocument();
acDocManager->lockDocument(pDoc, AcAp::kWrite);
// Judge if the entity passed in is my user-defined entity , Then modify
if (pEnt->isKindOf(cascoCDeviceDrawing::desc()))
{
cascoCDeviceDrawing* pMyClass = cascoCDeviceDrawing::cast(pEnt);
// Upgrade the opening level to writable , Prevent objects from being opened in read-only mode
if( !upgradeOpen(pMyClass) )
{
acDocManager->unlockDocument(pDoc);
return;
}
// Create this object , In order to switch CAD resources
CAcModuleResourceOverride thisResource;
CDeviceAttribute Diatest(CWnd::FromHandle(adsw_acadMainWnd()));
Diatest.DoModal();
pMyClass->close();
}
// All modifications are completed , Unlock document
acDocManager->unlockDocument(pDoc);
// Refresh the display
actrTransactionManager->flushGraphics();
}
bool CDoubleClickEdit::upgradeOpen(AcDbObject *pEnt)
{
if(pEnt->upgradeOpen()!=Acad::eOk)
{
acutPrintf(" error : Can't open %s Entity !", pEnt->isA()->name());
return FALSE;
}
return TRUE;
}边栏推荐
- Guangzhou metro line 14 xinshixu station is under construction, and residents in Baiyun District are about to start a double line transfer mode!
- 第四步-用户开发环境设置
- 15、判断二维数组中是否存在目标值
- Leetcode -- minimum number of rotation array
- 我用小程序容器让移动研发效率提升了5倍!
- 漏洞分析丨HEVD-0x8.IntegerOverflow[win7x86]
- LinkedList源码按摩,啊舒服
- 关于软考高级要不要报班学习
- 【JZOF】14剪绳子
- B2B e-commerce website scheme for building materials industry: enable the transformation and upgrading of building materials enterprises to achieve cost reduction and efficiency improvement
猜你喜欢

二分、三分、01分数规划 【第I弹】

Xiao Hei stands up again and looks at leetcode:653. Sum of two IV - enter BST

OSPF的LSA及优化
Edge team explains how to improve the comprehensive performance experience through disk cache compression technology

TCP Basics

我用小程序容器让移动研发效率提升了5倍!

【学习笔记】border与period

B2B e-commerce website scheme for building materials industry: enable the transformation and upgrading of building materials enterprises to achieve cost reduction and efficiency improvement

Arthas tutorial

Redis interview questions must be known and learned
随机推荐
SQL Server、MySQL主从搭建,EF Core读写分离代码实现
技术人 | 研发效能的思考总结
OSPF的LSA及优化
SuperMap iServer发布管理以及调用地图服务
Choosing a supplier service system is the first step for large health industry enterprises to move towards digital transformation
Double pointer technique
centos7下安装mysql,网上文章都不太准
基于ModelArts续写最伟大的作品【玩转华为云】
Holy Grail of web and double wing layout, float, clear, both
Massive data topn problem
工业品MRO采购网站有哪些优势?一文带你读懂
二分、三分、01分数规划【第III弹】
[esp32][esp idf] esp32s3 quickly build lvglv7.9
漏洞分析丨HEVD-0x8.IntegerOverflow[win7x86]
What are the highlights of B2B2C system? How to help jewelry enterprises build an omni channel multi merchant mall management system
IE兼容性问题处理
Oracle中的小知识
Kubernetes
Prometheus operation and maintenance tool promtool (IV) TSDB function
语音聊天app——如何规范开发流程?