Дипломная работа: Защита данных от несанкционированного доступа
Control: PView;
S : string;
begin
Dialog:= New(PDialog, Init(R, Titles[AOptions and $3]));
with Dialog^ do
begin
Options:= Options or ofCentered;
R.Assign(3, 2, Size.X - 2, Size.Y - 3);
FormatStr(S, Msg, Params^);
Insert(New(PStaticText, Init(R, S)));
X:= -2;
R.Assign(0, 0, 10, 2);
for I:= 0 to 3 do
if AOptions and ($0100 shl I) <> 0 then
Inc(X, R.B.X - R.A.X + 2);
X:= (Size.X - X) shr 1;
for I:= 0 to 3 do
if AOptions and ($0100 shl I) <> 0 then
begin
Control:= New(PButton, Init(
R, ButtonName[I], Commands[i], bfNormal));
Insert(Control);
Control^.MoveTo(X, Size.Y - 3);
Inc(X, Control^.Size.X + 2);
end;
SelectNext(False);
end;
if AOptions and mfInsertInApp = 0 then
MyMessageBoxRect:= DeskTop^.ExecView(Dialog)