Hi,
I have tried to use the CustomButtons property of the TMessageDlg class as follows:
procedure TMain.Form1Show(Sender: TObject);
var
dlg:TMessageDlg;
bttns:TCustomDialogButtons;
button:TCustomDialogButton;
begin
dlg:=TMessageDlg.Create(Self);
bttns:=TCustomDialogButtons.Create(dlg, TCustomDialogButton);
button:=bttns.Add;
dlg.CustomButtons:=bttns;
dlg.Show;
end;
The code does not work, saying 'Cannot assign a TCustomDialogButton to a TCustomDialogButton'.
Have I done something wrong here?
Thanks