Delphi 3 & MessageDlg

Delphi 3 & MessageDlg

Post by Marco Schellin » Sun, 31 Dec 1899 09:00:00



Hi,

Is it possipble tio change the caption of the buttons on a MessageDlg?

I want the buttons to say Yes/No/Cancel -> Ja/Nee/Annuleer?

Marco

 
 
 

Delphi 3 & MessageDlg

Post by KT95 » Sun, 31 Dec 1899 09:00:00


case MessageDlg('A decision must be
made?',mtConfirmation,[mbYes,mbNo,mbCancel],0) of
 mrYes : mrYesProc;
 mrNo   : mrNoProc;
 mrCancel : mrCancelProc;
end; {case}

or for the [mbYes,mbNo,mbCancel] you can also use a predefined set
mbYesNoCancel

go

--
Remove NOSPAM. from email



Quote:> Hi,

> Is it possipble tio change the caption of the buttons on a MessageDlg?

> I want the buttons to say Yes/No/Cancel -> Ja/Nee/Annuleer?

> Marco


 
 
 

Delphi 3 & MessageDlg

Post by Tjarko de Jo » Sun, 31 Dec 1899 09:00:00



Quote:>case MessageDlg('A decision must be
>made?',mtConfirmation,[mbYes,mbNo,mbCancel],0) of
> mrYes : mrYesProc;
> mrNo   : mrNoProc;
> mrCancel : mrCancelProc;
>end; {case}

>or for the [mbYes,mbNo,mbCancel] you can also use a predefined set
>mbYesNoCancel

>go

 
 
 

Delphi 3 & MessageDlg

Post by Jorge » Sun, 31 Dec 1899 09:00:00



> Hi,

> Is it possipble tio change the caption of the buttons on a MessageDlg?

> I want the buttons to say Yes/No/Cancel -> Ja/Nee/Annuleer?

> Marco

Look in the Dialogs.pas for the following text:
Caption := LoadResString(ButtonCaptions[B]);

instead of that text, use your own array of captions for the dialog
buttons.

The ButtonCaptions returns a pointer to the address LoadResString will
look for.
Redeclare that array (to return string with each element as you want
them) and loose the LoadResString command.

Hope it helps.

If you use the Application.MessageBox or the MessageBox function, the
captions depends on the installed language in Windows.
But with MessageDlg, it depends on the installed language in Delphi.

-Jorgen

 
 
 

Delphi 3 & MessageDlg

Post by Lance Johns » Sun, 31 Dec 1899 09:00:00


Greetings:

As others have pointed out there are ways to do so. However, an easier
way is the component designed by Greg Lief that does all of that for
you at either design-time or run-time. Check out his page. It is
certainly worth the time and the components are free unless you want
the source code.

<www.greglief.com/delphi.shtml>



>Hi,

>Is it possipble tio change the caption of the buttons on a MessageDlg?

>I want the buttons to say Yes/No/Cancel -> Ja/Nee/Annuleer?

>Marco

 
 
 

1. Q: ShowMessage, MessageDlg, and Exception problems with MDI

Hi,

  Can any one help me regarding the ShowMessage, MessageDlg, and
Exception problems with MDI program.

  I have a MDI application, and when i try to use any of the above
functions, the compiler give 'UNKNOWN IDENTIFIER' error, only when i use
these function with the childs, but not with the parent. Any help is
appreciated.

Regards,
MAH

2. COMMERCIAL:OmniAccess single clinet multiple servers

3. MessageDlg Undeclared Identifier

4. DB2EXFMT - Question

5. D3: Newbie question on InputBox and MessageDlg

6. AffinityCity is now available to the public. (WEB-ENABLED DATABASE COLLABORATION)

7. SQL Queries and MessageDlg interfere?

8. ^Z in BCP source file!!

9. StayOnTop and MessageDLG

10. Progress &amp; Kylix/Delphi

11. Delphi...Delphi....Delphi - New Delphi Site

12. Delphi:Paradox vs Delphi:SQL Anywhere vs Delphi:FoxPro via Apollo

13. Problems with compiling of DBBrowser demo (Delphi 1.0) in Delphi 2.0 and Delphi 3