procedure TForm1.Button1Click(Sender: TObject) ;
var
AMsgDialog: TForm;
ACheckBox: TCheckBox;
begin
AMsgDialog := CreateMessageDialog
('This is a test message.', mtWarning,
[mbYes, mbNo]) ;
ACheckBox := TCheckBox.Create(AMsgDialog) ;
with AMsgDialog do
try
Caption := 'Dialog Title' ;
Height := 169;
with ACheckBox do begin
Parent := AMsgDialog;
Caption := 'Don''t show me again.';
Top := 121;
Left := 8;
end;
if (ShowModal = ID_YES) then begin
if ACheckBox.Checked then begin
//... do if checked
end;
//... do if NOT checked
end;
finally
Free;
end;
end;