Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Font used by AfxMessageBox

Posted on 1998-11-26
4
Medium Priority
?
316 Views
Last Modified: 2013-12-03
I'm working with MS-Visual C++ 5.0
How to get the font used by AfxMessageBox ?
0
Comment
Question by:maciej_lach
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
plaroche earned 150 total points
ID: 1325346
AfxMessageBox really calls CWinApp::DoMessageBox, you can override that function with Classwizard and implement your own message box.  

I do not think you can modify the usual message box but you can implement your own where you will control everything.
0
 

Author Comment

by:maciej_lach
ID: 1325347
I will to create my "MessageBox" derived CView.

class CMyMessageBox : public CView

How to get the font-name, which used AfxMessageBox for example ?
thanks,
maciej_lach


0
 

Author Comment

by:maciej_lach
ID: 1325348
I will to create my "MessageBox" derived CView.

      class CMyMessageBox : public CView

How to get the font-name, which used AfxMessageBox for example ?
thanks,
maciej_lach
0
 

Expert Comment

by:thinh
ID: 1325349
You can do this way to get the font used by MessageBox:

NONCLIENTMETRICS temp;
SystemParametersInfo(SPI_GETNONCLIENTMETRICS, , &temp , );

You will get the font info in:
temp.lfMessageFont

Good luck!

Thinh Truong


0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

661 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