> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# messagebox

> Shows a Windows message box with text, caption, and numeric flags, then returns the integer result code.

<div className="real-function-page">
  ```lua theme={null}
  messagebox(text: string, caption: string, flags: number): integer
  ```

  ## Argumentos

  <ParamField path={"text"} type={"string"} required>
    Message text.
  </ParamField>

  <ParamField path={"caption"} type={"string"} required>
    Window caption.
  </ParamField>

  <ParamField path={"flags"} type={"number"} required>
    Numeric message box flags.
  </ParamField>

  ## Retornos

  <ResponseField name={"result"} type={"integer"}>
    Integer result code returned by the message box.
  </ResponseField>

  ## Exemplo

  Show a Windows message box and read the integer result code returned by the dialog.

  ```lua theme={null}
  local result = messagebox("Real is ready.", "Real", 0)
  print(result)
  ```
</div>
