EnumFontsProc

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function is an application-defined callback function that processes font data from the EnumFonts function.

Syntax

int CALLBACK EnumFontsProc(
  lplf lplf, 
  lptm lptm, 
  DWORD dwType, 
  LPARAM lpData
);

Parameters

  • lplf
    [out] Pointer to a LOGFONT structure that contains information about the logical attributes of the font.
  • lptm
    [out] Pointer to a TEXTMETRIC structure that contains information about the physical attributes of the font.
  • dwType
    [in] DWORD that specifies the type of the font. The following table shows the possible values.

    Value Description

    DEVICE_FONTTYPE

    The font is a device-based font. If this value is not set, the font is a GDI-based font.

    RASTER_FONTTYPE

    The font is a raster font. If neither RASTER_FONTTYPE nor TRUETYPE_FONTTYPE is set, the font is a vector font.

    TRUETYPE_FONTTYPE

    The font is a TrueType font. If neither RASTER_FONTTYPE nor TRUETYPE_FONTTYPE is set, the font is a vector font.

  • lpData
    [in] Long pointer to the application-defined data that EnumFonts passed to EnumFontsProc.

Return Value

Nonzero continues enumeration. Zero stops enumeration.

Remarks

You can use the AND (&) operator with the RASTER_FONTTYPE and DEVICE_FONTTYPE constants to determine the font type.

If the device is capable of text transformations, such as scaling and italicizing, EnumFonts only enumerates the base font. The user must inquire into the text-transformation abilities of the device to determine the additional fonts that are available directly from the device.

An application must register the EnumFontsProc function by passing the address of the application to the EnumFonts function.

Windows CE 1.0 and 1.01 do not support TrueType fonts. In version 1.0, the value of the FontType parameter must be RASTER_FONTTYPE.

Windows CE 2.0 and later support both TrueType and raster fonts so FontType can have a value of either RASTER_FONTTYPE or TRUETYPE_FONTTYPE, depending on the Windows Embedded CE-based platform. Any given Windows Embedded CE-based platform supports only raster fonts or TrueType fonts, but not both.

Requirements

Header windows.h
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later

See Also

Reference

EnumFonts
LOGFONT
TEXTMETRIC