找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1098|回复: 0

[他山之石] Detecting if cancel was pressed in DCL dialog boxes

[复制链接]

已领礼包: 1268个

财富等级: 财源广进

发表于 2013-7-13 17:53:00 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
Detecting if cancel was pressed in DCL dialog boxes                         By Gopinath Taget
Its pretty rare to encounter DCL dialogs in AutoCAD now a days but if you do, here is some info that you might find useful.
Lets say you are using command reactors to detect when certain commands are cancelled, yet when the command has a dialog box, there is no difference if a user presses Cancel or OK (only the Editor reactor commandEnded() is called). So, how can you detect the difference between OK and Cancel when selected from a dialog box?
This a known issue with the AutoCAD DCL dialog implementation. A workaround for commands that use the DCL dialog is to read the AutoCAD system variable DIASTAT in the commandEnded() function. DIASTAT is set to 0 if the user has pressed Cancel, and set to 1 if the user presses OK. For AutoCAD MFC based commands, there is no solution at this time.


评分

参与人数 1D豆 +1 收起 理由
/db_自贡黄明儒_ + 1 很给力!经验;技术要点;资料分享奖!

查看全部评分

论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-12-23 05:22 , Processed in 0.395144 second(s), 36 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表