Solved

Font used by AfxMessageBox

Posted on 1998-11-26
4
291 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
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
plaroche earned 50 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
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…

820 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