Hi
I create my own dialogs, so that you can modify the position etc.

Look At
function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType;
Buttons: TMsgDlgButtons): TForm; 

function MessageApp(const Msg: string; DlgType: TMsgDlgType;
  Buttons: TMsgDlgButtons): Integer;
{***********************************************************************
****}
{Comments: Adaptation of the messageDLG form, for the screen position
{***********************************************************************
****}
var
  myDialog : TForm;
begin
  {Displays the default windows message dialog}
  myDialog := CreateMessageDialog(Msg, DlgType, Buttons);
  try
    myDialog.HelpContext := 0;
    myDialog.HelpFile := '';
    // You can set the top and left as well with myDialog.Top :=
    myDialog.Position := poMainFormCenter;
    Result := myDialog.ShowModal;
  finally
    myDialog.Free;
  end;
end;

Hope this help
Johan Fourie
http://www.cq.co.za


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rainer von Saleski
Sent: 10 July 2007 09:16 AM
To: [email protected]
Subject: MessageDlgPos

According to the Delphi 7 Help file, the syntax for the MessageDlgPos
function is

function MessageDlgPos(const Msg: string; DlgType: TMsgDlgType; Buttons:

TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer): Word;

function MessageDlgPos(const Msg: WideString; DlgType: TMsgDlgType;
Buttons: TMsgDlgButtons; HelpCtx: Longint; X, Y: Integer; DefaultBtn: 
TMsgDlgBtn = mbNone; Bitmap: TBitmap = nil): Integer;

and the Delphi example for this function is

MessageDlgPos('Are you there?',mtConfirmation, mbYesNoCancel, 0, 200,
200, mbYes);

However, the source files seem to have never heard of the DefaultBtn
argument.  Worse, if the only two buttons are mbYes and mbNo, the YES
button becomes the default (!) -- but there should be no default by
default.  Or I have to ask my questions in the negative (Yuk!)

Does anyone know how to fix this?  Can I simply edit Dialogs.pas and
recompile it?  How do I go about doing that?  (Not "how do I fix the
source", but what do I compile, and does it need any special
installation?)

Thanks,
Rainer

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi


DISCLAIMER:
Everything in this email and its attachments relating to the official business 
of arivia.kom is proprietary to arivia.kom. It is confidential, legally 
privileged and protected by law. The person addressed in the email is the sole 
authorised recipient. Any unauthorized dissemination or copying of this e-mail 
(or any attachment to this e-mail) or the wrongful disclosure of the 
information herein contained is prohibited.
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to