dos_getcancel

显示一个非模态带取消按钮的对话框. 因为对话框是非模态的, 可由用户中断, 所以你可能在执行长时间处理的时候用到它. 一旦使用参数呼叫这个函数便开始初始化对话框. 不带参数呼叫检查对话框的状态. 带T参数呼叫关闭对话框.


语法

(dos_getcancel title message)

(dos_getcancel T)

(dos_getcancel)

参数

title

窗口标题.

 

message

消息.

 

T

关闭对话框.

返回

当初始化或关闭对话框时返回nil.

当检查打开状态时返回, 如果是打开的则返回T, 否则返回nil.

示例

Command: (setq x 0)

0

 

Command: (dos_getcancel "Testing" "Testing, please wait...")

nil

 

Command: (while (and (dos_getcancel) (< x 10000)) (setq x (1+ x)))

10000

 

Command: (if (= x 10000) (dos_getcancel t))

nil

 

Colder: