Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving System Fonts with an API Call

Status
Not open for further replies.

Doogie007

Technical User
Mar 3, 2001
2
CA
I was wondering if anyone knows of how to retrieve the system fonts installed on the client machine using an API call?
 
Is there a reason you must use the API? Search VB help for "fonts". Unless you have an odd requirement, this task is best performed using ordinary calls in VB.
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
I was going to use the Printer or Screen object to retreive the system fonts, but I prefer to use an API Call to get them. Do you know if there is any such function?
 
hmmm . . . I have to agree with Alt255 on this one . . . why would you want to use an API for this? But if you really want to, check this one out . . .


Private Declare Function EnumFontFamiliesEx Lib "gdi32" Alias "EnumFontFamiliesExA" (ByVal hdc As Long, lpLogFont As LOGFONT, ByVal lpEnumFontProc As Long, ByVal lParam As Long, ByVal dw As Long) As Long


API Description
EnumFontFamiliesEx enumerates all fonts installed in the system that match the font characteristics specified by a given LOGFONT structure. This function enumerates fonts based on a typeface name, character set, or both. This function, rather than EnumFontFamilies, is recommended for Win32-based applications.


- Jeff Marler
(please note, that the page is under construction)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top