2023-02-02 12:02:14 +03:00

26 lines
895 B
ObjectPascal

unit MsgBoxes;
{$mode delphi}
{$codepage UTF8}
interface
uses Classes, SysUtils, Forms;
{dialog types for Linux capatability}
const DLG_ASTERISK = $40;
DLG_EXCLAMATION = $30;
DLG_WARNING = $30;
DLG_ERROR = $10;
DLG_QUESTION = $20;
{stdcalls}
function ShowMessageBox (const AText, ATitle: String; const AMessageType: LongInt = 0): Integer; STDCALL;
function ShowMessageBoxA (const AText: String; const AMessageType: LongInt = 0): Integer; STDCALL;
implementation
//Sample Windows MessageDialogs
function ShowMessageBox (const AText, ATitle: String; const AMessageType: LongInt = 0): Integer;
begin
Result:= Application.MessageBox(PChar(AText), PChar(ATitle), AMessageType);
end;
function ShowMessageBoxA (const AText: String; const AMessageType: LongInt = 0): Integer;
begin
Result:= Application.MessageBox(PChar(AText), PChar(Application.Title), AMessageType);
end;
end.