TaskDialog Show(procedure...).

What is the C++ builder implementation of these demo codes for taskdialog:

  procedure(ButtonID: Integer)
    case ButtonID of
      mrOk: s := 'OK';
      mrCancel: s := 'Cancel';
      mrYes: s := 'Yes';
      mrNo: s := 'No';
      s := 'Other';
    lbEvents.Items.Add(s + ' button clicked');

    if TMSFMXTaskDialog1.InputSettings.InputType <> None then
      lbEvents.Items.Add('Input text: ' + TMSFMXTaskDialog1.InputSettings.Text);


Unfortunately there are currently no C++Builder versions of these demo applications available.

My question is how to impletement this statement in C++ Builder:
TMSFMXTaskDialog1.Show(procedure(ButtonID: Integer) .......);

I couldn't find anything to replace procedure in c++ builder.

The parameter of the show method can be a Delphi anonymous method.
It is explained here:

how you can handle Delphi anonymous methods from C++

another example of ignoring C++ Builder users that pay the exact same amount of money for the TMS components. It is all Dephi related and I'm getting real tired of it.

Is there anyway I can get an event when the form has closed (not 'about to get closed' but really closed).
Trying to launch a new TaskDialog right after the first one closed, depending on the user input. Normal properties like 'Visible' are not available. Since you cannot launch it with ShowModal() its hard to deal with results if you cannot use the Delphi method (and no, I'm not going to write C++ templates to mimic Delphi behaviour)

AdvTaskDialog->Execute() is a blocking function that only returns when the dialog was closed.
You can as such show two dialogs after each other with:

  advtaskdialog1->Instruction = "Choose first";
  advtaskdialog2->Instruction = "Choose next";

Dear Bruno,

TMSFMXTaskDialog has no method called 'Execute' . The documented way to start the dialog is with Show()

I'm sorry. I had confused with the VCL TaskDialog that was in my head due to other support questions that day about it.
There is at this moment only OnDialogClose() that is triggered when the dialog is about to be closed.
We will need to add an event OnDialogClosed() if you need an event that is triggered after it was closed.