home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / enumfont / global.bas < prev    next >
BASIC Source File  |  1991-09-19  |  5KB  |  138 lines

  1. ' Copyright (C) Telelink Systems 1991
  2. ' Phone:  (916) 332-2671
  3. ' Fax:    (916) 332-2529
  4. ' Cserve: 70523,2574
  5.  
  6.  
  7. 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
  8.  
  9.  
  10. '-- Logical font structure
  11. Global Const LF_FACESIZE = 32
  12. Type LOGFONT
  13.     lfheight As Integer
  14.     lfwidth As Integer
  15.     lfEscapement As Integer
  16.     lforientation As Integer
  17.     lfWeight As Integer
  18.     lfItalic As String * 1
  19.     lfUnderline As String * 1
  20.     lfStrikeout As String * 1
  21.     lfCharSet As String * 1
  22.     lfOutPrecision As String * 1
  23.     lfClipPrecision As String * 1
  24.     lfQuality As String * 1
  25.     lfPitchAndFamily As String * 1
  26.     lfFaceName As String * LF_FACESIZE
  27. End Type
  28.  
  29. '-- text metrics structure
  30. Type TEXTMETRIC
  31.     tmHeight As Integer
  32.     tmAscent As Integer
  33.     tmDescent As Integer
  34.     tmInternalLeading As Integer
  35.     tmExternalLeading As Integer
  36.     tmAveCharWidth As Integer
  37.     tmMaxCharWidth As Integer
  38.     tmWeight As Integer
  39.     tmItalic As String * 1
  40.     tmUnderlined As String * 1
  41.     tmStruckout As String * 1
  42.     tmFirstChar As String * 1
  43.     tmLastChar As String * 1
  44.     tmDefaultChar As String * 1
  45.     tmBreakChar As String * 1
  46.     tmPitchAndFamily As String * 1
  47.     tmCharSet As String * 1
  48.     tmOverhang As Integer
  49.     tmDigitizedAspectX As Integer
  50.     tmDigitizedAspectY As Integer
  51. End Type
  52.  
  53. Global Const OUT_DEFAULT_PRECIS = 0
  54. Global Const OUT_STRING_PRECIS = 1
  55. Global Const OUT_CHARACTER_PRECIS = 2
  56. Global Const OUT_STROKE_PRECIS = 3
  57.  
  58. Global Const CLIP_DEFAULT_PRECIS = 0
  59. Global Const CLIP_CHARACTER_PRECIS = 1
  60. Global Const CLIP_STROKE_PRECIS = 2
  61.  
  62. Global Const DEFAULT_QUALITY = 0
  63. Global Const DRAFT_QUALITY = 1
  64. Global Const PROOF_QUALITY = 2
  65.  
  66. Global Const DEFAULT_PITCH = 0
  67. Global Const FIXED_PITCH = 1
  68. Global Const VARIABLE_PITCH = 2
  69.  
  70. Global Const ANSI_CHARSET = 0
  71. Global Const SYMBOL_CHARSET = 2
  72. Global Const SHIFTJIS_CHARSET = 128
  73. Global Const OEM_CHARSET = 255
  74.  
  75. '  Font Families
  76. '
  77. Global Const FF_DONTCARE = 0    '  Don't care or don't know.
  78. Global Const FF_ROMAN = 16  '  Variable stroke width, serifed.
  79.  
  80. '  Times Roman, Century Schoolbook, etc.
  81. Global Const FF_SWISS = 32  '  Variable stroke width, sans-serifed.
  82.  
  83. '  Helvetica, Swiss, etc.
  84. Global Const FF_MODERN = 48 '  Constant stroke width, serifed or sans-serifed.
  85.  
  86. '  Pica, Elite, Courier, etc.
  87. Global Const FF_SCRIPT = 64 '  Cursive, etc.
  88. Global Const FF_DECORATIVE = 80 '  Old English, etc.
  89.  
  90.  
  91. '-- mapping modes
  92. Declare Function SetMapMode Lib "GDI" (ByVal hDC As Integer, ByVal nMapMode As Integer) As Integer
  93. Declare Function GetMapMode Lib "GDI" (ByVal hDC As Integer) As Integer
  94.  
  95. '  Mapping Modes
  96. Global Const MM_TEXT = 1
  97. Global Const MM_LOMETRIC = 2
  98. Global Const MM_HIMETRIC = 3
  99. Global Const MM_LOENGLISH = 4
  100. Global Const MM_HIENGLISH = 5
  101. Global Const MM_TWIPS = 6
  102. Global Const MM_ISOTROPIC = 7
  103. Global Const MM_ANISOTROPIC = 8
  104.  
  105. Declare Function GetDeviceCaps Lib "GDI" (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer
  106. '  Device Parameters for GetDeviceCaps()
  107. Global Const DRIVERVERSION = 0  '  Device driver version
  108. Global Const TECHNOLOGY = 2 '  Device classification
  109. Global Const HORZSIZE = 4   '  Horizontal size in millimeters
  110. Global Const VERTSIZE = 6   '  Vertical size in millimeters
  111. Global Const HORZRES = 8    '  Horizontal width in pixels
  112. Global Const VERTRES = 10   '  Vertical width in pixels
  113. Global Const BITSPIXEL = 12 '  Number of bits per pixel
  114. Global Const PLANES = 14    '  Number of planes
  115. Global Const NUMBRUSHES = 16    '  Number of brushes the device has
  116. Global Const NUMPENS = 18   '  Number of pens the device has
  117. Global Const NUMMARKERS = 20    '  Number of markers the device has
  118. Global Const NUMFONTS = 22  '  Number of fonts the device has
  119. Global Const NUMCOLORS = 24 '  Number of colors the device supports
  120. Global Const PDEVICESIZE = 26   '  Size required for device descriptor
  121. Global Const CURVECAPS = 28 '  Curve capabilities
  122. Global Const LINECAPS = 30  '  Line capabilities
  123. Global Const POLYGONALCAPS = 32 '  Polygonal capabilities
  124. Global Const TEXTCAPS = 34  '  Text capabilities
  125. Global Const CLIPCAPS = 36  '  Clipping capabilities
  126. Global Const RASTERCAPS = 38    '  Bitblt capabilities
  127. Global Const ASPECTX = 40   '  Length of the X leg
  128. Global Const ASPECTY = 42   '  Length of the Y leg
  129. Global Const ASPECTXY = 44  '  Length of the hypotenuse
  130.  
  131. Global Const LOGPIXELSX = 88    '  Logical pixels/inch in X
  132. Global Const LOGPIXELSY = 90    '  Logical pixels/inch in Y
  133.  
  134. Global Const SIZEPALETTE = 104  '  Number of entries in physical palette
  135. Global Const NUMRESERVED = 106  '  Number of reserved entries in palette
  136. Global Const COLORRES = 108 '  Actual color resolution
  137.  
  138.