[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Dialogs' (#lcl)

# CreateMessageDialog

Creates a dialog form type with the specified caption, message, and buttons.

## Declaration

Source position: dialogs.pp line 905

`function CreateMessageDialog(`
`const aMsg: string;`
`DlgType: TMsgDlgType;`
`Buttons: TMsgDlgButtons`
`):TForm; overload; function CreateMessageDialog(`
`const aCaption: string;`
`const aMsg: string;`
`DlgType: TMsgDlgType;`
`Buttons: TMsgDlgButtons`
`):TForm; overload;`

## Arguments

`aMsg` |  | Message text for the dialog.
`DlgType` |  | Identifies the dialog type and the image for the dialog.
`Buttons` |  | Set of TMsgDlgBtn buttons displayed on the dialog.

## Function result

TForm instance with the content representing the specified parameters.

## Arguments

`aCaption` |  | Caption displayed as the title for the dialog.
`aMsg` |  | Message text for the dialog.
`DlgType` |  | Identifies the dialog type and the image for the dialog.
`Buttons` |  | Set of TMsgDlgBtn buttons displayed on the dialog.