mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:39:31 +02:00
Dialogs: overload CreateMessageDlg function with parameter to set dialog caption.
git-svn-id: trunk@57360 -
This commit is contained in:
parent
3f3f298212
commit
9801fd24ee
@ -679,7 +679,9 @@ function MessageDlgPos(const aMsg: string; DlgType: TMsgDlgType;
|
||||
function MessageDlgPosHelp(const aMsg: string; DlgType: TMsgDlgType;
|
||||
Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer;
|
||||
const HelpFileName: string): TModalResult; overload;
|
||||
function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType;
|
||||
function CreateMessageDialog(const aMsg: string; DlgType: TMsgDlgType;
|
||||
Buttons: TMsgDlgButtons): TForm; overload;
|
||||
function CreateMessageDialog(const aCaption, aMsg: string; DlgType: TMsgDlgType;
|
||||
Buttons: TMsgDlgButtons): TForm; overload;
|
||||
function DefaultPromptDialog(const DialogCaption,
|
||||
DialogMessage: String;
|
||||
|
@ -562,14 +562,20 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): TForm;
|
||||
function CreateMessageDialog(const aMsg: string; DlgType: TMsgDlgType;
|
||||
Buttons: TMsgDlgButtons): TForm;
|
||||
begin
|
||||
Result := CreateMessageDialog('', aMsg, DlgType, Buttons);
|
||||
end;
|
||||
|
||||
function CreateMessageDialog(const aCaption, aMsg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): TForm;
|
||||
var
|
||||
PDlg: TPromptDialog;
|
||||
Btns: PLongInt;
|
||||
CancelValue, DefaultIndex, ButtonCount: Longint;
|
||||
begin
|
||||
Btns := GetPromptUserButtons(Buttons, CancelValue, DefaultIndex, ButtonCount, False, mbOk);
|
||||
PDlg := TPromptDialog.CreateMessageDialog('', Msg, DialogIds[DlgType], Btns, ButtonCount, DefaultIndex);
|
||||
PDlg := TPromptDialog.CreateMessageDialog(aCaption, aMsg, DialogIds[DlgType], Btns, ButtonCount, DefaultIndex);
|
||||
Result := TForm(PDlg);
|
||||
ReallocMem(Btns, 0);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user