home *** CD-ROM | disk | FTP | other *** search
/ CICA 1992 November / CICA_MS_Windows_CD-ROM_Walnut_Creek_November_1992.iso / win3 / programr / vbasic / metalib / metalib.glo < prev    next >
Text File  |  1992-03-04  |  14KB  |  301 lines

  1. '
  2. 'Constants for the DrawText api call
  3. '
  4. Global Const DT_TOP = &H0
  5. Global Const DT_LEFT = &H0
  6. Global Const DT_CENTER = &H1
  7. Global Const DT_RIGHT = &H2
  8. Global Const DT_VCENTER = &H4
  9. Global Const DT_BOTTOM = &H8
  10. Global Const DT_WORDBREAK = &H10
  11. Global Const DT_SINGLELINE = &H20
  12. Global Const DT_EXPANDTABS = &H40
  13. Global Const DT_TABSTOP = &H80
  14. Global Const DT_NOCLIP = &H100
  15. Global Const DT_EXTERNALLEADING = &H200
  16. Global Const DT_CALCRECT = &H400
  17. Global Const DT_NOPREFIX = &H800
  18. Global Const DT_INTERNAL = &H1000
  19.  
  20. Global Const NULL = 0&
  21. Global Const TRUE = -1
  22. Global Const FALSE = 0
  23. Global Const LF_FACESIZE = 32
  24. Global Const OUT_DEFAULT_PRECIS = 0
  25. Global Const OUT_STRING_PRECIS = 1
  26. Global Const OUT_CHARACTER_PRECIS = 2
  27. Global Const OUT_STROKE_PRECIS = 3
  28.  
  29. Global Const CLIP_DEFAULT_PRECIS = 0
  30. Global Const CLIP_CHARACTER_PRECIS = 1
  31. Global Const CLIP_STROKE_PRECIS = 2
  32.  
  33. Global Const DEFAULT_QUALITY = 0
  34. Global Const DRAFT_QUALITY = 1
  35. Global Const PROOF_QUALITY = 2
  36.  
  37. Global Const DEFAULT_PITCH = 0
  38. Global Const FIXED_PITCH = 1
  39. Global Const VARIABLE_PITCH = 2
  40.  
  41. Global Const ANSI_CHARSET = 0
  42. Global Const SYMBOL_CHARSET = 2
  43. Global Const SHIFTJIS_CHARSET = 128
  44. Global Const OEM_CHARSET = 255
  45.  
  46. '  Font Families
  47. '
  48. Global Const FF_DONTCARE = 0    '  Don't care or don't know.
  49. Global Const FF_ROMAN = 16  '  Variable stroke width, serifed.
  50.  
  51. '  Times Roman, Century Schoolbook, etc.
  52. Global Const FF_SWISS = 32  '  Variable stroke width, sans-serifed.
  53.  
  54. '  Helvetica, Swiss, etc.
  55. Global Const FF_MODERN = 48 '  Constant stroke width, serifed or sans-serifed.
  56.  
  57. '  Pica, Elite, Courier, etc.
  58. Global Const FF_SCRIPT = 64 '  Cursive, etc.
  59. Global Const FF_DECORATIVE = 80 '  Old English, etc.
  60.  
  61. '  Font Weights
  62. Global Const FW_DONTCARE = 0
  63. Global Const FW_THIN = 100
  64. Global Const FW_EXTRALIGHT = 200
  65. Global Const FW_LIGHT = 300
  66. Global Const FW_NORMAL = 400
  67. Global Const FW_MEDIUM = 500
  68. Global Const FW_SEMIBOLD = 600
  69. Global Const FW_BOLD = 700
  70. Global Const FW_EXTRABOLD = 800
  71. Global Const FW_HEAVY = 900
  72.  
  73. Global Const FW_ULTRALIGHT = FW_EXTRALIGHT
  74. Global Const FW_REGULAR = FW_NORMAL
  75. Global Const FW_DEMIBOLD = FW_SEMIBOLD
  76. Global Const FW_ULTRABOLD = FW_EXTRABOLD
  77. Global Const FW_BLACK = FW_HEAVY
  78. Global Const MM_TEXT = 1
  79. Global Const MM_LOMETRIC = 2
  80. Global Const MM_HIMETRIC = 3
  81. Global Const MM_LOENGLISH = 4
  82. Global Const MM_HIENGLISH = 5
  83. Global Const MM_TWIPS = 6
  84. Global Const MM_ISOTROPIC = 7
  85. Global Const MM_ANISOTROPIC = 8
  86.  
  87. '  Device Parameters for GetDeviceCaps()
  88. Global Const DRIVERVERSION = 0  '  Device driver version
  89. Global Const TECHNOLOGY = 2   '  Device classification
  90. Global Const HORZSIZE = 4   '  Horizontal size in millimeters
  91. Global Const VERTSIZE = 6   '  Vertical size in millimeters
  92. Global Const HORZRES = 8    '  Horizontal width in pixels
  93. Global Const VERTRES = 10   '  Vertical width in pixels
  94. Global Const BITSPIXEL = 12 '  Number of bits per pixel
  95. Global Const PLANES = 14    '  Number of planes
  96. Global Const NUMBRUSHES = 16    '  Number of brushes the device has
  97. Global Const NUMPENS = 18   '  Number of pens the device has
  98. Global Const NUMMARKERS = 20    '  Number of markers the device has
  99. Global Const NUMFONTS = 22  '  Number of fonts the device has
  100. Global Const NUMCOLORS = 24 '  Number of colors the device supports
  101. Global Const PDEVICESIZE = 26   '  Size required for device descriptor
  102. Global Const CURVECAPS = 28 '  Curve capabilities
  103. Global Const LINECAPS = 30  '  Line capabilities
  104. Global Const POLYGONALCAPS = 32 'Polygonal capabilities
  105. Global Const TEXTCAPS = 34   '  Text capabilities
  106. Global Const CLIPCAPS = 36  '  Clipping capabilities
  107. Global Const RASTERCAPS = 38    '  Bitblt capabilities
  108. Global Const ASPECTX = 40   '  Length of the X leg
  109. Global Const ASPECTY = 42   '  Length of the Y leg
  110. Global Const ASPECTXY = 44  '  Length of the hypotenuse
  111. Global Const LOGPIXELSX = 88    '  Logical pixels/inch in X
  112. Global Const LOGPIXELSY = 90    '  Logical pixels/inch in Y
  113. Global Const SIZEPALETTE = 104  '  Number of entries in physical palette
  114. Global Const NUMRESERVED = 106  '  Number of reserved entries in palette
  115. Global Const COLORRES = 108 '  Actual color resolution
  116. '  Device Capability Masks:
  117. '  Device Technologies
  118. Global Const DT_PLOTTER = 0             '  Vector plotter
  119. Global Const DT_RASDISPLAY = 1          'Raster display
  120. Global Const DT_RASPRINTER = 2          '  Raster printer
  121. Global Const DT_RASCAMERA = 3           'Raster camera
  122. Global Const DT_CHARSTREAM = 4          'Character-stream, PLP
  123. Global Const DT_METAFILE = 5            'Metafile, VDM
  124. Global Const DT_DISPFILE = 6            '  Display-file
  125. '  Curve Capabilities
  126. Global Const CC_NONE = 0                '  Curves not supported
  127. Global Const CC_CIRCLES = 1             '  Can do circles
  128. Global Const CC_PIE = 2                 '  Can do pie wedges
  129. Global Const CC_CHORD = 4               '  Can do chord arcs
  130. Global Const CC_ELLIPSES = 8            '  Can do ellipese
  131. Global Const CC_WIDE = 16               '  Can do wide lines
  132. Global Const CC_STYLED = 32             '  Can do styled lines
  133. Global Const CC_WIDESTYLED = 64         '  Can do wide styled lines
  134. Global Const CC_INTERIORS = 128         '  Can do interiors
  135. '  Line Capabilities
  136. Global Const LC_NONE = 0                '  Lines not supported
  137. Global Const LC_POLYLINE = 2            '  Can do polylines
  138. Global Const LC_MARKER = 4              '  Can do markers
  139. Global Const LC_POLYMARKER = 8          '  Can do polymarkers
  140. Global Const LC_WIDE = 16               '  Can do wide lines
  141. Global Const LC_STYLED = 32             '  Can do styled lines
  142. Global Const LC_WIDESTYLED = 64         '  Can do wide styled lines
  143. Global Const LC_INTERIORS = 128         '  Can do interiors
  144. '  Polygonal Capabilities
  145. Global Const PC_NONE = 0                '  Polygonals not supported
  146. Global Const PC_POLYGON = 1             '  Can do polygons
  147. Global Const PC_RECTANGLE = 2           '  Can do rectangles
  148. Global Const PC_WINDPOLYGON = 4         '  Can do winding polygons
  149. Global Const PC_TRAPEZOID = 4           '  Can do trapezoids
  150. Global Const PC_SCANLINE = 8            '  Can do scanlines
  151. Global Const PC_WIDE = 16               '  Can do wide borders
  152. Global Const PC_STYLED = 32             '  Can do styled borders
  153. Global Const PC_WIDESTYLED = 64         '  Can do widestyled borders
  154. Global Const PC_INTERIORS = 128         '  Can do interiors
  155. '  Polygonal Capabilities
  156. Global Const CP_NONE = 0                '  No clippingof output
  157. Global Const CP_RECTANGLE = 1           '  Output clipped to rects
  158. '  Text Capabilities
  159. Global Const TC_OP_CHARACTER = &H1      '  Can do OutputPrecision CHARACTER
  160. Global Const TC_OP_STROKE = &H2         '  Can do OutputPrecision STROKE
  161. Global Const TC_CP_STROKE = &H4         '  Can do ClipPrecision STROKE
  162. Global Const TC_CR_90 = &H8             '  Can do CharRotAbility  90
  163. Global Const TC_CR_ANY = &H10           '  Can do CharRotAbility  ANY
  164. Global Const TC_SF_X_YINDEP = &H20      '  Can do ScaleFreedom X_YINDEPENDENT
  165. Global Const TC_SA_DOUBLE = &H40        '  Can do ScaleAbility DOUBLE
  166. Global Const TC_SA_INTEGER = &H80       '  Can do ScaleAbility INTEGER
  167. Global Const TC_SA_CONTIN = &H100       '  Can do ScaleAbility CONTINUOUS
  168. Global Const TC_EA_DOUBLE = &H200       '  Can do EmboldenAbility       DOUBLE
  169. Global Const TC_IA_ABLE = &H400         '  Can do ItalisizeAbility  ABLE
  170. Global Const TC_UA_ABLE = &H800         '  Can do UnderlineAbility  ABLE
  171. Global Const TC_SO_ABLE = &H1000        '  Can do StrikeOutAbility      ABLE
  172. Global Const TC_RA_ABLE = &H2000        '  Can do RasterFontAble        ABLE
  173. Global Const TC_VA_ABLE = &H4000        '  Can do VectorFontAble        ABLE
  174. Global Const TC_RESERVED = &H8000
  175.  
  176. '  Brush Styles
  177. Global Const BS_SOLID = 0
  178. Global Const BS_NULL = 1
  179. Global Const BS_HOLLOW = BS_NULL
  180. Global Const BS_HATCHED = 2
  181. Global Const BS_PATTERN = 3
  182. Global Const BS_INDEXED = 4
  183. Global Const BS_DIBPATTERN = 5
  184.  
  185. '  Hatch Styles
  186. Global Const HS_HORIZONTAL = 0  '  -----
  187. Global Const HS_VERTICAL = 1    '  |||||
  188. Global Const HS_FDIAGONAL = 2   '  \\\\\
  189. Global Const HS_BDIAGONAL = 3   '  /////
  190. Global Const HS_CROSS = 4   '  +++++
  191. Global Const HS_DIAGCROSS = 5   '  xxxxx
  192.  
  193. '  Pen Styles
  194. Global Const PS_SOLID = 0
  195. Global Const PS_DASH = 1    '  -------
  196. Global Const PS_DOT = 2 '  .......
  197. Global Const PS_DASHDOT = 3 '  _._._._
  198. Global Const PS_DASHDOTDOT = 4  '  _.._.._
  199. Global Const PS_NULL = 5
  200. Global Const PS_INSIDEFRAME = 6
  201. Type Rect
  202.     left As Integer
  203.     Top As Integer
  204.     right As Integer
  205.     bottom As Integer
  206. End Type
  207. Type POINTAPI
  208.     X As Integer
  209.     Y As Integer
  210. End Type
  211. Type PAINTSTRUCT
  212.     hDC As Integer
  213.     ferase As Integer
  214.     rcpaint As Rect
  215.     fRestore As Integer
  216.     fIncUpdate As Integer
  217.     rgbReserved As String * 16
  218. End Type
  219. Type RGBTRIPLE
  220.     rgbtBlue As String * 1
  221.     rgbtGreen As String * 1
  222.     rgbtRed As String * 1
  223. End Type
  224. '  Logical Brush (or Pattern)
  225. Type LOGBRUSH
  226.     lbStyle As Integer
  227.     lbColor As Long
  228.     lbHatch As Integer
  229. End Type
  230.  
  231. '  Logical Pen
  232. Type LOGPEN
  233.     lopnStyle As Integer
  234.     lopnWidth As POINTAPI
  235.     lopnColor As Long
  236. End Type
  237. Type LOGFONT
  238.     lfHeight As Integer
  239.     lfWidth As Integer
  240.     lfEscapement As Integer
  241.     lfOrientation As Integer
  242.     lfWeight As Integer
  243.     lfItalic As String * 1
  244.     lfUnderline As String * 1
  245.     lfStrikeOut As String * 1
  246.     lfCharSet As String * 1
  247.     lfOutPrecision As String * 1
  248.     lfClipPrecision As String * 1
  249.     lfQuality As String * 1
  250.     lfPitchAndFamily As String * 1
  251.     lfFaceName As String * LF_FACESIZE
  252. End Type
  253. Global FontType As LOGFONT
  254. Global BrushType As LOGBRUSH
  255. Global gDrawRectangle As Rect
  256. Global gMdc%             'metafile device context
  257. Global gHmf%             'Metafile Handle
  258. Declare Function DrawText Lib "GDI" (ByVal hDC As Integer, ByVal lpStr As String, ByVal nCount As Integer, lpRect As Rect, ByVal wFormat As Integer) As Integer
  259. Declare Function TextOut Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal lpString As String, ByVal nCount As Integer) As Integer
  260. Declare Function CreateFontIndirect Lib "GDI" (lpLogFont As LOGFONT) As Integer
  261. Declare Function FloodFill Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal crColor As Long) As Integer
  262. Declare Function SetTextJustification Lib "GDI" (ByVal hDC As Integer, ByVal nBreakExtra As Integer, ByVal nBreakCount As Integer) As Integer
  263. Declare Function GetTextExtent Lib "GDI" (ByVal hDC As Integer, ByVal lpString As String, ByVal nCount As Integer) As Long
  264. Declare Function DeleteObject Lib "GDI" (ByVal hObject As Integer) As Integer
  265. Declare Function CreatePen Lib "GDI" (ByVal nPenStyle As Integer, ByVal nWidth As Integer, ByVal crColor As Long) As Integer
  266. Declare Function CreatePenIndirect Lib "GDI" (lpLogPen As LOGPEN) As Integer
  267. Declare Function CreateSolidBrush Lib "GDI" (ByVal crColor As Long) As Integer
  268. Declare Function CreateHatchBrush Lib "GDI" (ByVal nIndex As Integer, ByVal crColor As Long) As Integer
  269. Declare Function CreateBrushIndirect Lib "GDI" (lpLogBrush As LOGBRUSH) As Integer
  270. Declare Function SelectObject Lib "GDI" (ByVal hDC As Integer, ByVal hObject As Integer) As Integer
  271. Declare Function SetBkColor Lib "GDI" (ByVal hDC As Integer, ByVal crColor As Long) As Long
  272. Declare Function GetBkColor Lib "GDI" (ByVal hDC As Integer) As Long
  273. Declare Function SetBkMode Lib "GDI" (ByVal hDC As Integer, ByVal nBkMode As Integer) As Integer
  274. Declare Function GetBkMode Lib "GDI" (ByVal hDC As Integer) As Integer
  275. Declare Function SetTextColor Lib "GDI" (ByVal hDC As Integer, ByVal crColor As Long) As Long
  276. Declare Function GetTextColor Lib "GDI" (ByVal hDC As Integer) As Long
  277. Declare Function SetTextAlign Lib "GDI" (ByVal hDC As Integer, ByVal wFlags As Integer) As Integer
  278. Declare Function GetTextAlign Lib "GDI" (ByVal hDC As Integer) As Integer
  279. Declare Function GetFocus Lib "User" () As Integer
  280. Declare Sub GetClientRect Lib "User" (ByVal hWnd As Integer, lpRect As Rect)
  281. Declare Function DeleteMetafile Lib "GDI" (ByVal gHmf As Integer) As Integer
  282. Declare Function CreateMetaFile Lib "GDI" (ByVal lpString As Any) As Integer
  283. Declare Function rectangle% Lib "GDI" (ByVal hDC%, ByVal X1%, ByVal Y1%, ByVal X2%, ByVal Y2%)
  284. Declare Function Arc Lib "GDI" (ByVal hDC As Integer, ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer, ByVal X3 As Integer, ByVal Y3 As Integer, ByVal X4 As Integer, ByVal Y4 As Integer) As Integer
  285. Declare Function MoveTo Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
  286. Declare Function LineTo Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Integer
  287. Declare Function CloseMetaFile% Lib "GDI" (ByVal hDC%)
  288. Declare Function PlayMetaFile% Lib "GDI" (ByVal hDC%, ByVal gHmf%)
  289. Declare Function Ellipse Lib "GDI" (ByVal hDC As Integer, ByVal X1 As Integer, ByVal Y1 As Integer, ByVal X2 As Integer, ByVal Y2 As Integer) As Integer
  290. Declare Function GetMetaFileBits Lib "GDI" (ByVal gHmf As Integer) As Integer
  291. Declare Function CopyMetaFile Lib "GDI" (ByVal gHmf As Integer, ByVal lpFilename As String) As Integer
  292. Declare Function SetMapMode Lib "GDI" (ByVal hDC As Integer, ByVal nMapMode As Integer) As Integer
  293. Declare Function SetWindowExt Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
  294. Declare Function SetViewPortExt Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
  295. Declare Function SetWindowOrg Lib "GDI" (ByVal hDC As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
  296. Declare Function BeginPaint Lib "User" (ByVal hWnd As Integer, lpPaint As PAINTSTRUCT) As Integer
  297. Declare Function GetDeviceCaps Lib "GDI" (ByVal hDC As Integer, ByVal nIndex As Integer) As Integer
  298. Declare Function GetMetaFile Lib "GDI" (ByVal lpFilename As String) As Integer
  299.  
  300.  
  301.