![]() |
【转帖】[讨论]关于自定义双击
[讨论]关于自定义双击
[讨论]关于自定义双击 在一个程序中,我定义了一个双击类.重载了 startedit() 和 finishedit() 函数. 但好像在程序结束后,要再运行一下任意一个命令才能结束这个双击. 请问是怎么回事? 这是类定义 #pragma once #include "acdblclkedit.h" #include "bclpro.h" class bclclk : public acdbdoubleclickedit { public: bclclk(void); virtual ~bclclk(void); public: virtual void startedit(acdbentity *pent, acgepoint3d pt); virtual void finishedit(); }; 类的实现: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 #include "stdafx.h" #include "bclclk.h" #include "frmmain.h" bclclk::bclclk(void) { } bclclk::~bclclk(void) { } void bclclk::startedit(acdbentity *pent, acgepoint3d pt) { acdocmanager->lockdocument(curdoc()); if (pent->iskindof(bclsub::desc()) == adesk::ktrue) { bclsub *pentity = bclsub::cast(pent); if (pentity->upgradeopen() == acad::eok) { cacmoduleresourceoverride resoverrid; frmmain *pmainfrm = new frmmain(cwnd::fromhandle(adsw_acadmainwnd())); pmainfrm->setentity(pentity); pmainfrm->startdialog(pmainfrm, true); if (pmainfrm) { delete pmainfrm; pmainfrm = null; } pentity->recordgraphicsmodified(); pentity->close(); pentity->recordgraphicsmodified(); } } acdocmanager->unlockdocument(curdoc()); acedupdatedisplay(); finishedit(); } void bclclk::finishedit() { acedsssetfirst(null, null); } 现在这样做了之后,必须得任意运行一个命令才能结束双击,看到实体的修改变化.请问我应该如何做才能让它自动结束这个双击? |
所有的时间均为北京时间。 现在的时间是 11:34 AM. |