int CALLBACK EnumFontsProc(lpLogFont, lpTextMetric, nFontType, lpData) | |||
LPLOGFONT lpLogFont; | |||
LPTEXTMETRIC lpTextMetric; | |||
DWORD nFontType; | |||
LPARAM lpData; |
The EnumFontsProc function is an application defined callback function that processes font data from the EnumFonts function.
lpLogFont
Points to a LOGFONT structure that contains information about the logical attributes of the font.
The LOGFONT structure has the following form:
typedef struct tagLOGFONT { /* lf */
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
BYTE lfFaceName[LF_FACESIZE];
} LOGFONT;
lpTextMetric
Points to a TEXTMETRIC structure that contains information about the physical attributes of the font.
The TEXTMETRIC structure has the following form:
typedef struct tagTEXTMETRIC { /* tm */
LONG tmHeight;
LONG tmAscent;
LONG tmDescent;
LONG tmInternalLeading;
LONG tmExternalLeading;
LONG tmAveCharWidth;
LONG tmMaxCharWidth;
LONG tmWeight;
LONG tmOverhang;
LONG tmDigitizedAspectX;
LONG tmDigitizedAspectY;
BYTE tmFirstChar;
BYTE tmLastChar;
BYTE tmDefaultChar;
BYTE tmBreakChar;
BYTE tmItalic;
BYTE tmUnderlined;
BYTE tmStruckOut;
BYTE tmPitchAndFamily;
BYTE tmCharSet;
} TEXTMETRIC;
nFontType
Specifies the type of the font.
lpData
Points to the application-supplied data passed by EnumFonts.
This function must return a nonzero value to continue enumeration; to stop enumeration, it must return zero.
An application must register the EnumFontsProc function by passing its address to the EnumFonts function.
EnumFontsProc is a placeholder for the application-supplied function name. The actual name must be exported by including it in an EXPORTS statement in the application's module-definition file.