I have a VCL application that I port to FireMonkey. One of the things I came across is that it is MessageDlg(...)deprecated in FireMonkey. I’ll go a little more, I understand that I need to use the method FMX.DialogService.MessageDialog. So I created a function to display the dialog:
function TfMain.GetDeleteConfirmation(AMessage: String): String;
var
lResult: String;
begin
lResult:='';
TDialogService.PreferredMode:=TDialogService.TPreferredMode.Platform;
TDialogService.MessageDialog(AMessage, TMsgDlgType.mtConfirmation,
[ TMsgDlgBtn.mbYes, TMsgDlgBtn.mbCancel ], TMsgDlgBtn.mbCancel, 0,
procedure(const AResult: TModalResult)
begin
case AResult of
mrYes: lResult:='Y';
mrCancel: lResult:='C';
end;
end);
Result:=lResult;
end;
I don’t think I am doing it right, because I’m not sure that I can set a local variable inside an anonymous method, but it still compiles.
I call it this:
if GetDeleteConfirmation('Are you sure you want to delete this entry?')<>'Y' then
exit;
When I launched it, a dialog box appears with a message:

2 (, ). -, , - 2- .
Delphi 10.1 Berlin Update 2.
!
EDIT 20170320: @LURD :
function TfMain.GetDeleteConfirmation(AMessage: String): String;
var
lResultStr: String;
begin
lResultStr:='';
TDialogService.PreferredMode:=TDialogService.TPreferredMode.Platform;
TDialogService.MessageDialog(AMessage, TMsgDlgType.mtConfirmation,
FMX.Dialogs.mbYesNo, TMsgDlgBtn.mbNo, 0,
procedure(const AResult: TModalResult)
begin
case AResult of
mrYes: lResultStr:='Y';
mrNo: lResultStr:='N';
end;
end);
Result:=lResultStr;
end;