Declaration: MessageDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer;
MessageDlg brings up a message box and asks the user for a response. The parameter Msg is the content of the message that appears, DlgType indicates the type of the dialog, and the parameter Buttons controls what buttons should appear in the message box. The parameter DlgType may take one of the following values:
mtWarning .... A message box containing a yellow exclamation mark symbol.
mtError .... A message box containing a red stop sign.
mtInformation .... A message box containing a blue "i".
mtConfirmation .... A message box containing a green question mark.
mtCustom .... A message box containing no bitmap. The caption of the message box is the name of the application's executable file.
The set Buttons may contain one or several of the following identifiers:
mbYes .... A button saying 'Yes'
mbNo .... A button saying 'No'
mbOK .... A button saying 'OK'
mbCancel .... A button saying 'Cancel'
mbAbort .... A button saying 'Abort'
mbRetry .... A button saying 'Retry'
mbIgnore .... A button saying 'Ignore'
mbAll .... A button saying 'All'
mbNoToAll .... A button saying 'No to All'
mbYesToAll .... A button saying 'Yes to All'
mbClose .... A button saying 'Close'
The function returns a code which reflects the clicked button. The predefined constants mrYes to mrClose can be used to check the function result.

Hint: A message box is a modal dialog which disables the parent window until the user interacts with the modal window.

Example: The following code snippet asks the user for confirmation. If the user clicks the "OK" button, the code block 1 is executed:
if MessageDlg ('Please confirm',
               mtConfirmation, [mbOK, mbCancel]) = mrOK then
   // code block 1