04-17-2009, 04:57 AM
Using this example (most simple example I found)
http://www.catch22.net/tuts/enumfont
I cannot figure out how to work the EnumFontFamiliesEx especially the callback function.
MSDN is not simple enough for me to understand http://msdn.microsoft.com/en-us/library/...S.85).aspx
Function EnumFixedFonts
Function FontNameProc
http://www.catch22.net/tuts/enumfont
I cannot figure out how to work the EnumFontFamiliesEx especially the callback function.
MSDN is not simple enough for me to understand http://msdn.microsoft.com/en-us/library/...S.85).aspx
Function EnumFixedFonts
LOGFONT logfont
;ZeroMemory(&logfont, sizeof(logfont));
logfont.lfCharSet = DEFAULT_CHARSET
logfont.lfPitchAndFamily = FIXED_PITCH|FF_DONTCARE
;logfont.lfFaceName = ""
;lstrcpy(logfont.lfFaceName "\0");
int hdc = GetDC(0)
EnumFontFamiliesEx(hdc &logfont &FontNameProc 0 0)
;EnumFontFamiliesEx(hdc &logfont call(&FontNameProc) 0 0)
ReleaseDC(0 hdc)
Function FontNameProc