语法
messagebox(text: string, caption: string, flags: number): integer参数
| 名称 | 类型 | 描述 |
|---|---|---|
text | string | Message text. |
caption | string | Window caption. |
flags | number | Numeric message box flags. |
返回值
| 名称 | 类型 | 描述 |
|---|---|---|
result | integer | Integer result code returned by the message box. |
说明
Shows a Windows message box with text, caption, and numeric flags, then returns the integer result code.
使用 3 个参数调用: text, caption, flags。参数表会说明哪些值必填,哪些值只用于细化行为。
返回 result (integer)。使用返回表区分成功值、nil 结果和可恢复错误。
示例
Show a Windows message box and read the integer result code returned by the dialog.
local result = messagebox("Real is ready.", "Real", 0)
print(result)