当前位置:网站首页>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;
}边栏推荐
- OSPF的不规则区域,LSA和序列号
- 4.调整数组顺序使奇数位于偶数前面
- Skiasharp's WPF self drawn drag ball (case version)
- 二维前缀和
- 13 probability distributions that must be understood in deep learning
- 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
- Redis设计规范
- 【JZOF】15二进制中1的位数
- SQL server, MySQL master-slave construction, EF core read-write separation code implementation
- 2022-uni-app解析token标准的方式-使用jsrsasign-爬坑过了
猜你喜欢

每天在岗不足8小时被辞?腾讯前员工追讨1300万加班费等,法院终审获赔9万

JS promotion: the underlying principle of flat tiling

6、双指针——递增数组两数之和与目标数相等
![[openharmony] [rk2206] build openharmony compiler (2)](/img/0c/2e8290403d64ec43d192969f776724.png)
[openharmony] [rk2206] build openharmony compiler (2)

Weekly report on July 27, 2022

office2013以上输入数学公式

OSPF的拓展配置,选路原则,防环及重发布

初识SuperMap iDesktop

巧用ngx_lua做流量分组

Digital transformation scheme of real estate: all-round digital intelligence system operation, helping real estate enterprises improve the effectiveness of management and control
随机推荐
并查集
Xiao Hei stands up again and looks at leetcode:653. Sum of two IV - enter BST
Edge team explains how to improve the comprehensive performance experience through disk cache compression technology
Digital construction of pharmaceutical industry is on the verge
2. 输出数组中重复的数字之一
[cloud based co creation] Huawei cloud: metastudio digital content production line, which seamlessly integrates the virtual world with the real world
博弈论 1.Introduction(组合游戏基本概念、对抗搜索、Bash游戏、Nim游戏)
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
Prometheus operation and maintenance tool promtool (IV) TSDB function
API 网关 APISIX 在Google Cloud T2A 和 T2D 的性能测试
Weekly report on July 27, 2022
【学习笔记】border与period
剑指offer
(十)defer关键字
2022 uni app parsing token standard - use jsrsasign - climb the pit
10、链表中倒数第k个节点
Massive data topn problem
Kubernetes
4.调整数组顺序使奇数位于偶数前面
Description of landingsite electronic label quppa firmware entering DFU status