EnumFontFamilies

This function enumerates the fonts in a specified font family that are available on a specified device. This function supersedes the EnumFonts function.

int EnumFontFamilies(
  HDC hdc, 
  LPCTSTR lpszFamily, 
  FONTENUMPROC lpEnumFontFamProc, 
  LPARAM lParam
);

Parameters

  • hdc
    [in] Handle to the device context (DC).
  • lpszFamily
    [in] Long pointer to a null-terminated string that specifies the family name of the desired fonts. If lpszFamily is NULL, EnumFontFamilies randomly selects and enumerates one font of each available type family.
  • lpEnumFontFamProc
    [in] Long pointer to the procedure-instance address of the application-defined callback function. For information about the callback function, see EnumFontFamProc.
  • lParam
    [in] Pointer to application-supplied data. EnumFontFamilies passes the data to the callback function along with the font information.

Return Values

The return value is the last value returned by the callback function. The application defines the meaning of the return value.

Remarks

For each font that has the typeface name specified by the lpszFamily parameter, the EnumFontFamilies function retrieves information about that font and passes the information to the function to which the lpEnumFontFamProc parameter points. The application-defined callback function can process the font information as desired. Enumeration continues until no fonts remain or until the callback function returns zero.

Windows CE 2.0 and later support systems that use either TrueType or raster fonts, but not both. The OEM chooses the font type, raster or TrueType, at system design time, and the application cannot be change the font type.

Windows CE 1.0 and 1.01 support only raster fonts.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Windows.h.
Link Library: Coredll.lib.

See Also

EnumFontFamProc | EnumFonts

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.