明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1334|回复: 3

如何正常退出对话框

[复制链接]
发表于 2009-11-25 20:37:00 | 显示全部楼层 |阅读模式

(action_tile "cancel" "(done_dialog)(exit)")

按“取消”时,提示出错:错误: quit / exit abort,如何能正常退出对话框呢?

发表于 2009-11-26 15:14:00 | 显示全部楼层
Managing Dialog Boxes 
 
Hiding Dialog Boxes

(defun c:hidedcl (/ dcl_id what_next cnt)
  (setq dcl_id (load_dialog "hidedcl.dcl"))  ;Load the dialog box.
  (setq what_next 2)
  (setq cnt 1)
  (while (>= what_next 2)                    ;Begin display loop.
    (if (null (new_dialog "hidedcl" dcl_id)) ;Initialize dialog
      (exit)                                 ;box, exit if nil
    ); endif                                 ;returned.
    ; Set action to take if a button is pressed. Either button 
    ; results in a done_dialog call to close the dialog box.
    ; Each button associates a specific status code with 
    ; done_dialog, and this status code is returned by 
    ; start_dialog. 
	
    (action_tile "accept" "(done_dialog 1)") ;Set action for OK.
    (action_tile "hide" "(done_dialog 4)")   ;Set action for 
                                             ickMe.
    (setq what_next (start_dialog))          ;Display dialog box.
    ; 
    (cond
      ((= what_next 4)                       rompt user to
        (getpoint "\npick a point")          ;pick pt.
      )
      ((= what_next 0)
        (prompt "\nuser cancelled dialog")
      )
    )
  )
  (unload_dialog dcl_id)
  (princ)
)
发表于 2009-11-26 17:51:00 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
 楼主| 发表于 2009-11-26 21:36:00 | 显示全部楼层
谢谢你们的帮助。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-10-1 19:20 , Processed in 0.183115 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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