Hello, I've been trying to get the installed font list from my machine into an array. I know enumfonts is the answer (and I have a working VB6 project) but I cannot figure it out w/PB. Any help or code samples would be great

Thanks!
Code: Select all
OpenConsole()
; Internal PB ENUMLOGFONT structure is broken.. Fixed now.
;
Structure ENUMLOGFONT2
elfLogFont.LOGFONT
elfFullName.b[#LF_FULLFACESIZE]
elfStyle.b[#LF_FACESIZE]
EndStructure
Procedure EnumFontFamProc(*lpelf.ENUMLOGFONT2, *lpntm.NEWTEXTMETRIC, FontType, lParam)
PrintN("Name: "+PeekS(@*lpelf\elfFullName[0]))
ProcedureReturn 1
EndProcedure
*Win = GetForegroundWindow_()
*DC = GetDC_(*Win)
If *DC
EnumfontFamilies_(*DC, @EnumFontFamProc(), 0)
ReleaseDC_(*Win,*DC)
EndIf
Print("Press a ENTER to quit")
Input()