Solved

Application->MessageBox + Other Buttons, e.g. checkbox etc ...

Posted on 2000-05-14
5
529 Views
Last Modified: 2010-04-04
Hi boys and girls,

Using Borland cpp Builder 4.x

In my code I often use
Application->MessageBox(....
to display a window with standard buttons.

My question.
Since the buttons are standard, is there a way to easily override them, add buttons, display a checkbox in the lower right corner ??

Or do I have to rewrite the Application->MessageBox call and display a window of my own with the same properties + extras I want ?

Hope this makes sense ?

sneeuw
0
Comment
Question by:sneeuw
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:shenqw
ID: 2808474
You can use MessageBox, you can use CreateMessageDialog.

Example in $(delphi)\Demos\Ado\AdoTest\AdoTest.dpr

procedure ShowProperties(Props: Properties);
var
  I: Integer;
  F: TForm;
  Button: TButton;
begin
.......
0
 

Accepted Solution

by:
LuK earned 50 total points
ID: 2808476
Application->MessageBox uses the API-Call MessageBox, so it only supports
the standart buttons(Ok,Cancel,Abort,Yes,No,Retry,Ignore,Help). To edit the box, you have to rewrite the Application->MessageBox call.
0
 

Author Comment

by:sneeuw
ID: 2808795
Hi Luk,

So there's no easier way ?
I have to create my own window which looks like the standard one, but with more buttons and options ??
0
 

Expert Comment

by:LuK
ID: 2810945
Soory, bur you on the standart MessageBox you can only change the text, the caption, the icon(no,error,question,infomation,warning) and choose one of this buttoncombinations:
Ok,Ok and Cancel, Yes and No, Yes and No and Cancel, Retry and Ignore and Abort

I think, there is a way to add an Help-button, but I din't know how. That's all you can change without create a own Dialog.
0
 

Author Comment

by:sneeuw
ID: 2811808
Thanks guys,

Have fun.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now