Solved

Question regarding system fonts

Posted on 2002-06-29
6
237 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

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
ASP.net build a IF/Then Walkthrough Guide 1 237
Adobe Acrobat Pro: how to copy style? 2 115
passing data from one form to another form in c++ 27 83
GET error with Font Awesome 3 17
Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

831 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