home *** CD-ROM | disk | FTP | other *** search
/ Windoware / WINDOWARE_1_6.iso / source / enumfont / read.me < prev   
Text File  |  1991-09-19  |  3KB  |  71 lines

  1. Enumfonts call from VB
  2. Copyright (C) Telelink Systems 1991, All rights reserved
  3. Phone:  (916) 332-2671   Fax:  (916) 332-2529   Cserve:  70523,2574
  4.  
  5. Written by Erez Carmel, Sacramento, California
  6.  
  7. Description:
  8.  
  9. The DLL allows Visual Basic to call Windodws API function EnumFonts.  
  10. The same function is called multiple times, as described here:
  11.  
  12. 1.  Call VBEnumFonts to find how many typefaces are there
  13. 2.  Allocate an array to accept typefaces
  14. 3.  Call VBEnumFonts to get the typefaces
  15. 4.  For each typeface, call VBEnumFonts to find how many fonts are available.
  16.     Then allocate 3 arrays of the appropriate size, and call VBEnumFonts to
  17.     get information about the fonts.
  18.  
  19.  
  20. The interface is declared by:
  21.  
  22. Declare Function VBEnumFonts Lib "enumfont.dll" (ByVal hDC%, ByVal lpFaceName As Any, lpLogFontArray As Any, lpTextMetricArray As Any, nFontTypeArray As Any, ByVal nArraySize%) As Integer
  23.  
  24.  
  25.  Where:
  26.  
  27.    hDC%              Is the context handle to the default printer, typically 
  28.                      provided by Printer.hDC
  29.    
  30.    lpFaceName        Is either a null, or the name of the desired typeface. If
  31.                      Null, the function will return one font for each available typeface.
  32.                      Reminder -- Null in VB is indicated by "byval 0&"
  33.  
  34.    lpLogFontArray    Is either a null, or the first element of an array of type
  35.                      LOGFONT.  The array should be large enought to accept as
  36.                      many items as specified by the last parameter.
  37.  
  38.    lpTextMetricArray Is either a null, or the first element of an array of type
  39.                      TEXEMETRIC.  The array should be large enough to accept
  40.                      As many elelment as specified by the last parameter.
  41.  
  42.    nFontTypeArray    Is either a null, or the first element of an array of type
  43.                      integer.  The array should be large enough to accept as
  44.                      many elements as specified by the last parameter.
  45.  
  46.    nArraySize%       Is the number of elemnets expected, e.g the size of the 
  47.                      three arrays.  Can be 0, in which case no data will be 
  48.                      transfered to the arrays.  The function will return data 
  49.                      up to the number of elements specified.
  50.  
  51.    Function Returns: The number of available fonts which meet the
  52.                      specification.  If lpFaceName is null, this would be
  53.                      the number of typefaces.  If lpFaceName specifies a typeface,
  54.                      this will be the number of fonts under that typeface.
  55.  
  56. -----
  57.  
  58. You are free to use this code and incorporate it in your programs.  
  59. If you find it useful, a $7.50 payment will be appreciated. In return, 
  60. you will be informed of future changes/enhancements.
  61.  
  62. ------
  63.  
  64. The author makes no warranties, express or implied, oral or written,
  65. including any implied warranties of merchantability or fitness for a
  66. particular use.  In no event will the author be liable for any damages
  67. whatsoever arising from the use of this software.
  68.  
  69.  
  70.  
  71.