Solved

Font used by AfxMessageBox

Posted on 1998-11-26
4
301 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 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

Suggested Solutions

Title # Comments Views Activity
twoTwo  challenge 35 121
post4 challenge 28 123
matchUp  challenge 9 134
scoreUp challenge 14 74
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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…

710 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