Skip to content

dos_getcancel

Dale Fugier edited this page Jul 1, 2026 · 1 revision

Displays a modeless dialog box that consists of a message and a cancel button. Because the dialog box is modeless, you can use it when performing long processes that can be interrupted by the user. The function is called once with arguments to initialize the dialog box. It is called with no arguments to check the open status of the dialog box. It can be called with a T argument to close the dialog box.

Syntax

(dos_getcancel title message)
(dos_getcancel T)
(dos_getcancel)

Parameters

title

A string containing the dialog box title.

message

A string containing a message.

T

Closes the dialog box.

Returns

Returns nil when initializing and closing the dialog box.

When checking the open status, it return T if the dialog box is open, otherwise, nil is returned.

Example

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

Clone this wiki locally