Solved

Change fonts in ShowMessage / MessageDlg

Posted on 1998-03-22
3
2,268 Views
Last Modified: 2013-12-03
I need a way to change the fonts in ShowMessage and MessageDlg functions.
0
Comment
Question by:loucks
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
Socrates050697 earned 100 total points
ID: 1360707
If you have the Delphi VCL source code :-

They both use a function in Dialogs.Pas called 'CreateMessageDialog'. This sets up the dialog box, including the fonts that they use. You could alter this to make it show the font that you want.

Socrates
0
 

Author Comment

by:loucks
ID: 1360708
Well, I do have the source code, but it looks hard...  :)  I guess maybe I will just copy it and modify it to show a particular font in my one application.

Can I make a declaration that overrides the declaration in dialogs.pas or would I have to create a new dialogs.pas and use that instead of the supplied dialogs.pas?
0
 
LVL 1

Expert Comment

by:Socrates050697
ID: 1360709
The easiest thing to do is to copy the relavent functions - ie CreateMessageDialog, ShowMessage, and MessageDlg - and paste them into your own app. Rename them to MyShowMessage or whatever and then your're free to do what you want with them. Alternatively if you don't rename them, they will automatically overide the ones in dialogs.pas.


0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

792 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