EnumFontFamProc Callback Function

Public Function EnumFontFamProc (ByVal lpelf As Long, ByVal lpntm As Long, ByVal FontType As Long, ByVal lParam As Long) As Long
  ' application-specific code goes here
End Function

Description & Usage

The EnumFontFamProc callback function processes each font enumerated by EnumFontFamilies. The function receives a large amount of information describing both the logical font attributes as well as its metrics. Information describing TrueType fonts is received by the function in a slightly different format than non-TrueType font information. This function does not necessarily have to be named EnumFontFamProc -- that is simply the name given to it in discussions about the Windows API.

Return Value

If the function returns 0, EnumFontFamilies immediately stops enumerating fonts. If the function returns a non-zero value, EnumFontFamilies continues enumerating fonts as long as another one can be found.

Visual Basic-Specific Issues

Like all callback functions, EnumFontFamProc must be declared Public and be defined in a module.

Parameters

lpelf
A pointer to an ENUMLOGFONT structure describing the logical attributes of the font.
lpntm
If the font is a TrueType font, this is a pointer to a NEWTEXTMETRIC structure. If the font is not a TrueType font, this is a pointer to a TEXTMETRIC structure. Either structure describes the text metrics of the font.
FontType
A combination of the following flags (although usually only one is used) identifying the type of font:
DEVICE_FONTTYPE
The font is a device font.
RASTER_FONTTYPE
The font is a raster font.
TRUETYPE_FONTTYPE
The font is a TrueType font.
lParam
Additional data specified by EnumFontFamilies.

Constant Definitions

Const DEVICE_FONTTYPE = &H2
Const RASTER_FONTTYPE = &H1
Const TRUETYPE_FONTTYPE = &H4

Used By

EnumFontFamilies

Go back to the Callback Function listing.
Go back to the Reference section index.


Last Modified: October 29, 1999
This page is copyright © 1999 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/e/enumfontfamproc.html