DOCERR: EnumFontFamProc Documentation IncorrectLast reviewed: July 23, 1997Article ID: Q87975 |
3.10
WINDOWS
kbtoolkbtoolg kbdocerr
The information in this article applies to:
SUMMARYOn page 266 of the Microsoft Windows Software Development Kit (SDK) "Programmer's Reference, Volume 2: Functions" manual, the documentation for the EnumFontFamProc callback function incorrectly defines the NEWLOGFONT data structure, which is not listed in the WINDOWS.H header file. An application should use the ENUMLOGFONT data structure, which is listed in the WINDOWS.H header file, with the EnumFontFamProc function.
MORE INFORMATIONThe EnumFontFamProc function is an application-defined callback function specified when the application calls the EnumFontFamilies function. The function prototype for EnumFontFamProc is as follows:
int CALLBACK EnumFontFamProc( LOGFONT FAR* lpnlf, // structure contains logical-font data TEXTMETRIC FAR* lpntm, // structure contains physical-font data int FontType, // type of font LPARAM lParam); // address of application-defined dataThe EnumFontFamProc documentation defines a NEWLOGFONT data structure that contains information that is specific to TrueType fonts. As stated earlier, the NEWLOGFONT data structure does not appear in the WINDOWS.H header file. Windows calls the EnumFontFamProc function with a pointer to the ENUMLOGFONT data structure, which is defined in the WINDOWS.H header file as follows:
#define LF_FULLFACESIZE (LF_FACESIZE * 2) typedef struct tagENUMLOGFONT { LOGFONT elfLogFont; char elfFullName[LF_FULLFACESIZE]; char elfStyle[LF_FACESIZE]; } ENUMLOGFONT, FAR* LPENUMLOGFONT;An application can ease its access to the elfFullName and elfStyle members in an EnumFontFamily enumeration by defining its EnumFontFamProc callback function as follows:
int CALLBACK EnumFontFamProc( LPENUMLOGFONT lpelf, // structure contains logical-font data TEXTMETRIC FAR* lpntm, // structure contains physical-font data int FontType, // type of font LPARAM lParam); // address of application-defined dataIn the EnumFontFamProc function, if the TRUETYPE_FONTTYPE bit in the FontType parameter is true, the function can access these members using lpelf->elfFullName and lpelf->elfStyle.
|
Additional reference words: 3.10 docerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |