dos_msgboxex

创建, 显示并操作一个自定义Windows消息对话框. 消息框包含应用程序定义的消息和标题, 附加所有预先定义的图标和按钮组合.


语法

(dos_msgboxex text title button-list icon)

参数

text

对话框消息.

 

title

对话框标题.

 

button-list

自定义按钮的标签列表. 列表中的字符串对应创建的自定义按钮标签. 最多允许5个按钮. 注意, 默认按钮总是表中的第一个.

 

消息框图标. 可用值如下:

 

0

星号 (i)

1

感叹 (!)

2

帮助 (x)

3

信息 (i)

4

疑问 (?)

5

终止 (x)

返回

代表用户按下按钮的整数:

nil 出错时.

示例

(setq a "Wouldn't it be nice to have a custom message box\n")

(setq b "function that would accept a list of strings that\n")

(setq c "identify custom button labels?  Thus, for instance,\n")

(setq d "you could present a user with three custom buttons.")

(setq text (strcat a b c d))

(setq buttons (list "Sometimes" "Never" "What?"))

(dos_msgboxex text "Question of the Day" buttons 4)

0