Solved

Question regarding system fonts

Posted on 2002-06-29
6
235 Views
Last Modified: 2013-12-03

When right clicking on the desktop, then clicking properties and switching to the Appearance tab in the Display Properties dialog box, you can adjust the fonts used for the titlebar, tooltips, message boxes, menus icons etc.

Which functions do I use in Visual C++ to acquire these fonts? I’ve used GetStockObject() but this function allows you only to retrieve the default system font and a few others.

By the way, I’m using Win32 SDK and not MFC at all.
0
Comment
Question by:josamoto
6 Comments
 
LVL 6

Expert Comment

by:DrDelphi
ID: 7118887
EnumFontFamilies(passing the Desktop's HDC as the first parameter). You can use this same methodology for the Printer's fonts.


Good luck!!


0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 7118897
0
 
LVL 12

Expert Comment

by:pjknibbs
ID: 7119544
I have a feeling that you're asking "how do I get the specific font used in the Windows title bar" rather than "how do I get a list of fonts installed on the system", which is what DrDelphi has told you how to do. Unfortunately I'm at home and don't have access to my Windows documentation at the moment, so can't answer that question...if it's still unanswered tomorrow I should be able to help.
0
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.

 
LVL 25

Accepted Solution

by:
clockwatcher earned 100 total points
ID: 7120447
They're stored in the registry as LOGFONTW structures.
 
  HKCU\Control Panel\Desktop\WindowMetrics

See the following article for an example:

  http://www.codeguru.com/mfc/comments/6527.shtml
0
 

Author Comment

by:josamoto
ID: 7150227
I presume that I'll be using something like GetProfileString() to access the registry. I'm not too keen on using the registry, the parameters to the above functions is a bit tricky, especially the first two which requires the application name and the key name.

What will I ce using to retrieve the font from the registry?
0
 

Author Comment

by:josamoto
ID: 7150235
Thanx man, you really helped me a lot!
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

Title # Comments Views Activity
Lambda for random numbers problem 7 106
Font install problem 9 41
How to programmatically differentiate between C and Java 10 188
FMX enumerated colours 2 84
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

932 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

12 Experts available now in Live!

Get 1:1 Help Now