realbasic-nug
[Top] [All Lists]

Re: Identifying System Font Name in Win32

To: "REALbasic NUG" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Identifying System Font Name in Win32
From: "Brian Rathbone" <brian dot rathbone at learningstation dot com>
Date: Fri, 31 Dec 2004 15:02:04 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BDFAE707 dot 1254F%fitzbew at nc dot rr dot com>
> How do I determine the name of the System font on Win32?

I did a little looking, and found vb examples that use SystemParametersInfo
with the  SPI_GETNONCLIENTMETRICS  flag.  This returns a NONCLIENTMETRICS
structure, which has pointers to several LOGFONT structures.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/nonclientmetrics_str.asp

Here are some of the notable members of the NONCLIENTMETRICS structure.
  lfCaptionFont
  Pointer to a LOGFONT structure that contains information about the caption
font.

  lfSmCaptionFont
  Pointer to a LOGFONT structure that contains information about the small
caption font.

  lfMenuFont
  Pointer to a LOGFONT structure that contains information about the font
used in menu bars.

  lfStatusFont
  Pointer to a LOGFONT structure that contains information about the font
used in status bars and tooltips.

  lfMessageFont
  Pointer to a LOGFONT
Are those what you are looking for?

If you run into trouble doing this, be sure to take a look at the Windows
Functionality Suite.  It has similar code that deals with the structures and
pointers.

If you get stuck, just give a shout.

hth,

Brian

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>