home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / d / d009_2 / 1.ddi / SAMPLES / WINAPI / WINGDI.IN$ / WINGDI.bin
Encoding:
Text File  |  1992-02-03  |  35.2 KB  |  913 lines

  1. '******************************** WINGDI.INC  *********************************
  2. 'Demonstrates: Sample Declare, Const, and Type structures for calling the
  3. '              Windows 'GDI' API routines.
  4. '
  5. 'Required Files: None
  6. '
  7. 'Uses:
  8. '
  9. 'Complexity Level: ADVANCED (Windows programming experience required)
  10. '
  11. 'Notes: This include file correspond to the 'GDI' section of the Windows SDK
  12. '       'windows.h' C header file.  This include files is provided for those
  13. '       who wish to call Windows API routines from MSTest.  Since this is a
  14. '       large Include file, you may wish to extract only the statements
  15. '       necessary for your particular API call(s).
  16. '
  17. '       NOTE: Some Windows.h struct field names have been changed to avoid
  18. '       conflicts with MSTest reserved words.  These changes are:
  19. '
  20. '       RECT                - left and right are defined as wleft and wright
  21. '       MSG and EVENTMSG    - time is defined as dwtime
  22. '
  23. '******************************************************************************
  24.  
  25. '$IFNDEF WinAPI_GENDefs
  26.  
  27.     '$DEFINE WinAPI_GENDefs
  28.     '   General Purpose Defines
  29.  
  30.     '  Conditional statement to avoid conflict with FASTTEST's WNAPIDEC.INC
  31.     '$IFNDEF WNAPIDEC
  32.         Type RECT
  33.             wleft As Integer
  34.             top As Integer
  35.             wright As Integer
  36.             bottom As Integer
  37.         End Type
  38.     '$ENDIF
  39.  
  40.     Type POINT
  41.         x As Integer
  42.         y As Integer
  43.     End Type
  44.  
  45. '$ENDIF
  46.  
  47. ' --------------------------------------------------------------------------
  48. '   GDI Section
  49. ' --------------------------------------------------------------------------
  50.  
  51. '$IFNDEF WinGDI
  52.     '$DEFINE WinGDI
  53.  
  54.     '  Binary raster ops
  55.     Const R2_BLACK = 1   '   0
  56.     Const R2_NOTMERGEPEN = 2 '  DPon
  57.     Const R2_MASKNOTPEN = 3  '  DPna
  58.     Const R2_NOTCOPYPEN = 4  '  PN
  59.     Const R2_MASKPENNOT = 5  '  PDna
  60.     Const R2_NOT = 6 '  Dn
  61.     Const R2_XORPEN = 7  '  DPx
  62.     Const R2_NOTMASKPEN = 8  '  DPan
  63.     Const R2_MASKPEN = 9 '  DPa
  64.     Const R2_NOTXORPEN = 10  '  DPxn
  65.     Const R2_NOP = 11    '  D
  66.     Const R2_MERGENOTPEN = 12    '  DPno
  67.     Const R2_COPYPEN = 13    '  P
  68.     Const R2_MERGEPENNOT = 14    '  PDno
  69.     Const R2_MERGEPEN = 15   '  DPo
  70.     Const R2_WHITE = 16  '   1
  71.  
  72.     '   Ternary raster operations
  73.     Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
  74.     Const SRCPAINT = &HEE0086    ' (DWORD) dest = source OR dest
  75.     Const SRCAND = &H8800C6  ' (DWORD) dest = source AND dest
  76.     Const SRCINVERT = &H660046   ' (DWORD) dest = source XOR dest
  77.     Const SRCERASE = &H440328    ' (DWORD) dest = source AND (NOT dest )
  78.     Const NOTSRCCOPY = &H330008  ' (DWORD) dest = (NOT source)
  79.     Const NOTSRCERASE = &H1100A6 ' (DWORD) dest = (NOT src) AND (NOT dest)
  80.     Const MERGECOPY = &HC000CA   ' (DWORD) dest = (source AND pattern)
  81.     Const MERGEPAINT = &HBB0226  ' (DWORD) dest = (NOT source) OR dest
  82.     Const PATCOPY = &HF00021 ' (DWORD) dest = pattern
  83.     Const PATPAINT = &HFB0A09    ' (DWORD) dest = DPSnoo
  84.     Const PATINVERT = &H5A0049   ' (DWORD) dest = pattern XOR dest
  85.     Const DSTINVERT = &H550009   ' (DWORD) dest = (NOT dest)
  86.     Const BLACKNESS = &H42  ' (DWORD) dest = BLACK
  87.     Const WHITENESS = &HFF0062   ' (DWORD) dest = WHITE
  88.  
  89.  
  90.     '  StretchBlt() Modes
  91.     Const BLACKONWHITE = 1
  92.     Const WHITEONBLACK = 2
  93.     Const COLORONCOLOR = 3
  94.  
  95.     '  PolyFill() Modes
  96.     Const ALTERNATE = 1
  97.     Const WINDING = 2
  98.  
  99.     '  Text Alignment Options
  100.     Const TA_NOUPDATECP = 0
  101.     Const TA_UPDATECP = 1
  102.  
  103.     Const TA_LEFT = 0
  104.     Const TA_RIGHT = 2
  105.     Const TA_CENTER = 6
  106.  
  107.     Const TA_TOP = 0
  108.     Const TA_BOTTOM = 8
  109.     Const TA_BASELINE = 24
  110.  
  111.     Const ETO_GRAYED = 1
  112.     Const ETO_OPAQUE = 2
  113.     Const ETO_CLIPPED = 4
  114.  
  115.     Const ASPECT_FILTERING = &H1
  116.  
  117.     '  Metafile Functions
  118.     Const META_SETBKCOLOR = &H201
  119.     Const META_SETBKMODE = &H102
  120.     Const META_SETMAPMODE = &H103
  121.     Const META_SETROP2 = &H104
  122.     Const META_SETRELABS = &H105
  123.     Const META_SETPOLYFILLMODE = &H106
  124.     Const META_SETSTRETCHBLTMODE = &H107
  125.     Const META_SETTEXTCHAREXTRA = &H108
  126.     Const META_SETTEXTCOLOR = &H209
  127.     Const META_SETTEXTJUSTIFICATION = &H20A
  128.     Const META_SETWINDOWORG = &H20B
  129.     Const META_SETWINDOWEXT = &H20C
  130.     Const META_SETVIEWPORTORG = &H20D
  131.     Const META_SETVIEWPORTEXT = &H20E
  132.     Const META_OFFSETWINDOWORG = &H20F
  133.     Const META_SCALEWINDOWEXT = &H400
  134.     Const META_OFFSETVIEWPORTORG = &H211
  135.     Const META_SCALEVIEWPORTEXT = &H412
  136.     Const META_LINETO = &H213
  137.     Const META_MOVETO = &H214
  138.     Const META_EXCLUDECLIPRECT = &H415
  139.     Const META_INTERSECTCLIPRECT = &H416
  140.     Const META_ARC = &H817
  141.     Const META_ELLIPSE = &H418
  142.     Const META_FLOODFILL = &H419
  143.     Const META_PIE = &H81A
  144.     Const META_RECTANGLE = &H41B
  145.     Const META_ROUNDRECT = &H61C
  146.     Const META_PATBLT = &H61D
  147.     Const META_SAVEDC = &H1E
  148.     Const META_SETPIXEL = &H41F
  149.     Const META_OFFSETCLIPRGN = &H220
  150.     Const META_TEXTOUT = &H521
  151.     Const META_BITBLT = &H922
  152.     Const META_STRETCHBLT = &HB23
  153.     Const META_POLYGON = &H324
  154.     Const META_POLYLINE = &H325
  155.     Const META_ESCAPE = &H626
  156.     Const META_RESTOREDC = &H127
  157.     Const META_FILLREGION = &H228
  158.     Const META_FRAMEREGION = &H429
  159.     Const META_INVERTREGION = &H12A
  160.     Const META_PAINTREGION = &H12B
  161.     Const META_SELECTCLIPREGION = &H12C
  162.     Const META_SELECTOBJECT = &H12D
  163.     Const META_SETTEXTALIGN = &H12E
  164.     Const META_DRAWTEXT = &H62F
  165.  
  166.     Const META_CHORD = &H830
  167.     Const META_SETMAPPERFLAGS = &H231
  168.     Const META_EXTTEXTOUT = &Ha32
  169.     Const META_SETDIBTODEV = &Hd33
  170.     Const META_SELECTPALETTE = &H234
  171.     Const META_REALIZEPALETTE = &H35
  172.     Const META_ANIMATEPALETTE = &H436
  173.     Const META_SETPALENTRIES = &H37
  174.     Const META_POLYPOLYGON = &H538
  175.     Const META_RESIZEPALETTE = &H139
  176.  
  177.     Const META_DIBBITBLT = &H940
  178.     Const META_DIBSTRETCHBLT = &Hb41
  179.     Const META_DIBCREATEPATTERNBRUSH = &H142
  180.     Const META_STRETCHDIB = &Hf43
  181.  
  182.     Const META_DELETEOBJECT = &H1f0
  183.  
  184.     Const META_CREATEPALETTE = &Hf7
  185.     Const META_CREATEBRUSH = &HF8
  186.     Const META_CREATEPATTERNBRUSH = &H1F9
  187.     Const META_CREATEPENINDIRECT = &H2FA
  188.     Const META_CREATEFONTINDIRECT = &H2FB
  189.     Const META_CREATEBRUSHINDIRECT = &H2FC
  190.     Const META_CREATEBITMAPINDIRECT = &H2FD
  191.     Const META_CREATEBITMAP = &H6FE
  192.     Const META_CREATEREGION = &H6FF
  193.  
  194.  
  195.     '  GDI Escapes
  196.     Const NEWFRAME = 1
  197.     Const ABORTDOC = 2
  198.     Const NEXTBAND = 3
  199.     Const SETCOLORTABLE = 4
  200.     Const GETCOLORTABLE = 5
  201.     Const FLUSHOUTPUT = 6
  202.     Const DRAFTMODE = 7
  203.     Const QUERYESCSUPPORT = 8
  204.     Const SETABORTPROC = 9
  205.     Const STARTDOC = 10
  206.     Const ENDDOCAPI = 11
  207.     Const GETPHYSPAGESIZE = 12
  208.     Const GETPRINTINGOFFSET = 13
  209.     Const GETSCALINGFACTOR = 14
  210.     Const MFCOMMENT = 15
  211.     Const GETPENWIDTH = 16
  212.     Const SETCOPYCOUNT = 17
  213.     Const SELECTPAPERSOURCE = 18
  214.     Const DEVICEDATA = 19
  215.     Const PASSTHROUGH = 19
  216.     Const GETTECHNOLGY = 20
  217.     Const GETTECHNOLOGY = 20
  218.     Const SETENDCAP = 21
  219.     Const SETLINEJOIN = 22
  220.     Const SETMITERLIMIT = 23
  221.     Const BANDINFO = 24
  222.     Const DRAWPATTERNRECT = 25
  223.     Const GETVECTORPENSIZE = 26
  224.     Const GETVECTORBRUSHSIZE = 27
  225.     Const ENABLEDUPLEX = 28
  226.     Const GETSETPAPERBINS = 29
  227.     Const GETSETPRINTORIENT = 30
  228.     Const ENUMPAPERBINS = 31
  229.     Const SETDIBSCALING = 32
  230.     Const EPSPRINTING = 33
  231.     Const ENUMPAPERMETRICS = 34
  232.     Const GETSETPAPERMETRICS = 35
  233.     Const POSTSCRIPT_DATA = 37
  234.     Const POSTSCRIPT_IGNORE = 38
  235.     Const GETEXTENDEDTEXTMETRICS = 256
  236.     Const GETEXTENTTABLE = 257
  237.     Const GETPAIRKERNTABLE = 258
  238.     Const GETTRACKKERNTABLE = 259
  239.     Const CEXTTEXTOUT = 512
  240.     Const ENABLERELATIVEWIDTHS = 768
  241.     Const ENABLEPAIRKERNING = 769
  242.     Const SETKERNTRACK = 770
  243.     Const SETALLJUSTVALUES = 771
  244.     Const SETCHARSET = 772
  245.  
  246.     Const CSTRETCHBLT = 2048
  247.     Const BEGIN_PATH = 4096
  248.     Const CLIP_TO_PATH = 4097
  249.     Const END_PATH = 4098
  250.     Const EXT_DEVICE_CAPS = 4099
  251.     Const RESTORE_CTM = 4100
  252.     Const SAVE_CTM = 4101
  253.     Const SET_ARC_DIRECTION = 4102
  254.     Const SET_BACKGROUND_COLOR = 4103
  255.     Const SET_POLY_MODE = 4104
  256.     Const SET_SCREEN_ANGLE = 4105
  257.     Const SET_SPREAD = 4106
  258.     Const TRANSFORM_CTM = 4107
  259.     Const SET_CLIP_BOX = 4108
  260.     Const SET_BOUNDS = 4109
  261.     Const SET_MIRROR_MODE = 4110
  262.  
  263.     '  Spooler Error Codes
  264.     Const SP_NOTREPORTED = &H4000
  265.     Const SP_ERROR = (-1)
  266.     Const SP_APPABORT = (-2)
  267.     Const SP_USERABORT = (-3)
  268.     Const SP_OUTOFDISK = (-4)
  269.     Const SP_OUTOFMEMORY = (-5)
  270.  
  271.     Const PR_JOBSTATUS = &H0
  272.  
  273.     '  Bitmap Header Definition
  274.     Type BITMAP '14 bytes
  275.         bmType As Integer
  276.         bmWidth As Integer
  277.         bmHeight As Integer
  278.         bmWidthBytes As Integer
  279.         bmPlanes As String * 1
  280.         bmBitsPixel As String * 1
  281.         bmBits As Long
  282.     End Type
  283.  
  284.     Type RGBTRIPLE
  285.         rgbtBlue As String * 1
  286.         rgbtGreen As String * 1
  287.         rgbtRed As String * 1
  288.     End Type
  289.  
  290.     Type RGBQUAD
  291.         rgbBlue as String * 1
  292.         rgbGreen As String * 1
  293.         rgbRed As String * 1
  294.         rgbReserved As String * 1
  295.     End Type
  296.  
  297.     '  structures for defining DIBs
  298.     Type BITMAPCOREHEADER '12 bytes
  299.         bcSize as Long
  300.         bcWidth As Integer
  301.         bcHeight As Integer
  302.         bcPlanes As Integer
  303.         bcBitCount As Integer
  304.     End Type
  305.  
  306.     Type BITMAPINFOHEADER '40 bytes
  307.         biSize As Long
  308.         biWidth As Long
  309.         biHeight As Long
  310.         biPlanes As Integer
  311.         biBitCount As Integer
  312.         biCompression As Long
  313.         biSizeImage As Long
  314.         biXPelsPerMeter As Long
  315.         biYPelsPerMeter As Long
  316.         biClrUsed As Long
  317.         biClrImportant As Long
  318.     End Type
  319.  
  320.     '  constants for the biCompression field
  321.     Const BI_RGB = 0
  322.     Const BI_RLE8 = 1
  323.     Const BI_RLE4 = 2
  324.  
  325.     Type BITMAPINFO
  326.         bmiHeader as BITMAPINFOHEADER
  327.         bmiColors As String * 128 ' Array length is arbitrary; may be changed
  328.     End Type
  329.  
  330.     Type BITMAPCOREINFO
  331.         bmciHeader As BITMAPCOREHEADER
  332.         bmciColors As String * 96 ' Array length is arbitrary; may be changed
  333.     End Type
  334.  
  335.     Type BITMAPFILEHEADER
  336.         bfType As Integer
  337.         bfSize As Long
  338.         bfReserved1 As Integer
  339.         bfReserved2 As Integer
  340.         bfOffBits As Long
  341.     End Type
  342.  
  343.  
  344.     '  Clipboard Metafile Picture Structure
  345.     Type HANDLETABLE
  346.         objectHandle As String * 512 ' Array length is arbitrary; may be changed
  347.     End Type
  348.  
  349.     Type METARECORD
  350.         rdSize As Long
  351.         rdFunction As Integer
  352.         rdParm As String * 512 ' Array length is arbitrary; may be changed
  353.     End Type
  354.  
  355.  
  356.     Type METAFILEPICT
  357.         mm As Integer
  358.         xExt As Integer
  359.         yExt As Integer
  360.         hMF As Integer
  361.     End Type
  362.  
  363.     Type METAHEADER
  364.         mtType As Integer
  365.         mtHeaderSize As Integer
  366.         mtVersion As Integer
  367.         mtSize As Long
  368.         mtNoObjects As Integer
  369.         mtMaxRecord As Long
  370.         mtNoParameters As Integer
  371.     End Type
  372.  
  373.     Type TEXTMETRIC
  374.         tmHeight As Integer
  375.         tmAscent As Integer
  376.         tmDescent As Integer
  377.         tmInternalLeading As Integer
  378.         tmExternalLeading As Integer
  379.         tmAveCharWidth As Integer
  380.         tmMaxCharWidth As Integer
  381.         tmWeight As Integer
  382.         tmItalic As String * 1
  383.         tmUnderlined As String * 1
  384.         tmStruckOut As String * 1
  385.         tmFirstChar As String * 1
  386.         tmLastChar As String * 1
  387.         tmDefaultChar As String * 1
  388.         tmBreakChar As String * 1
  389.         tmPitchAndFamily As String * 1
  390.         tmCharSet As String * 1
  391.         tmOverhang As Integer
  392.         tmDigitizedAspectX As Integer
  393.         tmDigitizedAspectY As Integer
  394.     End Type
  395.  
  396.     '  GDI Logical Objects:
  397.  
  398.     '  Pel Array
  399.     Type PELARRAY
  400.         paXCount As Integer
  401.         paYCount As Integer
  402.         paXExt As Integer
  403.         paYExt As Integer
  404.         paRGBs As String * 1
  405.     End Type
  406.  
  407.     '  Logical Brush (or Pattern)
  408.     Type LOGBRUSH
  409.         lbStyle As Integer
  410.         lbColor As Long
  411.         lbHatch As Integer
  412.     End Type
  413.  
  414.     '  Logical Pen
  415.     Type LOGPEN
  416.         lopnStyle As Integer
  417.         lopnWidth As POINT
  418.         lopnColor As Long
  419.     End Type
  420.  
  421.     Type PALETTEENTRY
  422.         peRed As String * 1
  423.         peGreen As String * 1
  424.         peBlue As String * 1
  425.         peFlags As String * 1
  426.     End Type
  427.  
  428.     '  Logical Palette
  429.     Type LOGPALETTE
  430.         palVersion As Integer
  431.         palNumEntries As Integer
  432.         palPalEntry As String * 252 ' Array length is arbitrary; may be changed
  433.     End Type
  434.  
  435.     '-------------------------------------------------------
  436.     '   LOGICAL FONTS...
  437.     '-------------------------------------------------------
  438.     '$IFNDEF WinGDI-WinCmDlg_DECL
  439.         '$DEFINE WinGDI-WinCmDlg_DECL
  440.         '  Logical Font
  441.         Const LF_FACESIZE = 32
  442.  
  443.         Type LOGFONT
  444.             lfHeight As Integer
  445.             lfWidth As Integer
  446.             lfEscapement As Integer
  447.             lfOrientation As Integer
  448.             lfWeight As Integer
  449.             lfItalic As String * 1
  450.             lfUnderline As String * 1
  451.             lfStrikeOut As String * 1
  452.             lfCharSet As String * 1
  453.             lfOutPrecision As String * 1
  454.             lfClipPrecision As String * 1
  455.             lfQuality As String * 1
  456.             lfPitchAndFamily As String * 1
  457.             lfFaceName As String * LF_FACESIZE
  458.         End Type
  459.     '$ENDIF
  460.     '----------------------------------------------------------
  461.     Const OUT_DEFAULT_PRECIS = 0
  462.     Const OUT_STRING_PRECIS = 1
  463.     Const OUT_CHARACTER_PRECIS = 2
  464.     Const OUT_STROKE_PRECIS = 3
  465.  
  466.     Const CLIP_DEFAULT_PRECIS = 0
  467.     Const CLIP_CHARACTER_PRECIS = 1
  468.     Const CLIP_STROKE_PRECIS = 2
  469.  
  470.     Const DEFAULT_QUALITY = 0
  471.     Const DRAFT_QUALITY = 1
  472.     Const PROOF_QUALITY = 2
  473.  
  474.     Const DEFAULT_PITCH = 0
  475.     Const FIXED_PITCH = 1
  476.     Const VARIABLE_PITCH = 2
  477.  
  478.     Const ANSI_CHARSET = 0
  479.     Const SYMBOL_CHARSET = 2
  480.     Const SHIFTJIS_CHARSET = 128
  481.     Const OEM_CHARSET = 255
  482.  
  483.     '  Font Families
  484.     '
  485.     Const FF_DONTCARE = 0    '  Don't care or don't know.
  486.     Const FF_ROMAN = 16  '  Variable stroke width, serifed.
  487.  
  488.     '  Times Roman, Century Schoolbook, etc.
  489.     Const FF_SWISS = 32  '  Variable stroke width, sans-serifed.
  490.  
  491.     '  Helvetica, Swiss, etc.
  492.     Const FF_MODERN = 48 '  Constant stroke width, serifed or sans-serifed.
  493.  
  494.     '  Pica, Elite, Courier, etc.
  495.     Const FF_SCRIPT = 64 '  Cursive, etc.
  496.     Const FF_DECORATIVE = 80 '  Old English, etc.
  497.  
  498.     '  Font Weights
  499.     Const FW_DONTCARE = 0
  500.     Const FW_THIN = 100
  501.     Const FW_EXTRALIGHT = 200
  502.     Const FW_LIGHT = 300
  503.     Const FW_NORMAL = 400
  504.     Const FW_MEDIUM = 500
  505.     Const FW_SEMIBOLD = 600
  506.     Const FW_BOLD = 700
  507.     Const FW_EXTRABOLD = 800
  508.     Const FW_HEAVY = 900
  509.  
  510.     Const FW_ULTRALIGHT = FW_EXTRALIGHT
  511.     Const FW_REGULAR = FW_NORMAL
  512.     Const FW_DEMIBOLD = FW_SEMIBOLD
  513.     Const FW_ULTRABOLD = FW_EXTRABOLD
  514.     Const FW_BLACK = FW_HEAVY
  515.  
  516.     '  Background Modes
  517.     Const TRANSPARENT = 1
  518.     Const OPAQUE = 2
  519.  
  520.     '  Mapping Modes
  521.     Const MM_TEXT = 1
  522.     Const MM_LOMETRIC = 2
  523.     Const MM_HIMETRIC = 3
  524.     Const MM_LOENGLISH = 4
  525.     Const MM_HIENGLISH = 5
  526.     Const MM_TWIPS = 6
  527.     Const MM_ISOTROPIC = 7
  528.     Const MM_ANISOTROPIC = 8
  529.  
  530.     '  Coordinate Modes
  531.     Const ABSOLUTE = 1
  532.     Const RELATIVE = 2
  533.  
  534.     '  Stock Logical Objects
  535.     Const WHITE_BRUSH = 0
  536.     Const LTGRAY_BRUSH = 1
  537.     Const GRAY_BRUSH = 2
  538.     Const DKGRAY_BRUSH = 3
  539.     Const BLACK_BRUSH = 4
  540.     Const NULL_BRUSH = 5
  541.     Const HOLLOW_BRUSH = NULL_BRUSH
  542.     Const WHITE_PEN = 6
  543.     Const BLACK_PEN = 7
  544.     Const NULL_PEN = 8
  545.     Const OEM_FIXED_FONT = 10
  546.     Const ANSI_FIXED_FONT = 11
  547.     Const ANSI_VAR_FONT = 12
  548.     Const SYSTEM_FONT = 13
  549.     Const DEVICE_DEFAULT_FONT = 14
  550.     Const DEFAULT_PALETTE = 15
  551.     Const SYSTEM_FIXED_FONT = 16
  552.  
  553.     '  Brush Styles
  554.     Const BS_SOLID = 0
  555.     Const BS_NULL = 1
  556.     Const BS_HOLLOW = BS_NULL
  557.     Const BS_HATCHED = 2
  558.     Const BS_PATTERN = 3
  559.     Const BS_INDEXED = 4
  560.     Const BS_DIBPATTERN = 5
  561.  
  562.     '  Hatch Styles
  563.     Const HS_HORIZONTAL = 0  '  -----
  564.     Const HS_VERTICAL = 1    '  |||||
  565.     Const HS_FDIAGONAL = 2   '  \\\\\
  566.     Const HS_BDIAGONAL = 3   '  /////
  567.     Const HS_CROSS = 4       '  +++++
  568.     Const HS_DIAGCROSS = 5   '  xxxxx
  569.  
  570.     '  Pen Styles
  571.     Const PS_SOLID = 0
  572.     Const PS_DASH = 1         '  -------
  573.     Const PS_DOT = 2          '  .......
  574.     Const PS_DASHDOT = 3      '  _._._._
  575.     Const PS_DASHDOTDOT = 4   '  _.._.._
  576.     Const PS_NULL = 5
  577.     Const PS_INSIDEFRAME = 6
  578.  
  579.     '  Device Parameters for GetDeviceCaps()
  580.     Const DRIVERVERSION = 0  '  Device driver version
  581.     Const TECHNOLOGY = 2 '  Device classification
  582.     Const HORZSIZE = 4   '  Horizontal size in millimeters
  583.     Const VERTSIZE = 6   '  Vertical size in millimeters
  584.     Const HORZRES = 8    '  Horizontal width in pixels
  585.     Const VERTRES = 10   '  Vertical width in pixels
  586.     Const BITSPIXEL = 12 '  Number of bits per pixel
  587.     Const PLANES = 14    '  Number of planes
  588.     Const NUMBRUSHES = 16    '  Number of brushes the device has
  589.     Const NUMPENS = 18   '  Number of pens the device has
  590.     Const NUMMARKERS = 20    '  Number of markers the device has
  591.     Const NUMFONTS = 22  '  Number of fonts the device has
  592.     Const NUMCOLORS = 24 '  Number of colors the device supports
  593.     Const PDEVICESIZE = 26   '  Size required for device descriptor
  594.     Const CURVECAPS = 28 '  Curve capabilities
  595.     Const LINECAPS = 30  '  Line capabilities
  596.     Const POLYGONALCAPS = 32 '  Polygonal capabilities
  597.     Const TEXTCAPS = 34  '  Text capabilities
  598.     Const CLIPCAPS = 36  '  Clipping capabilities
  599.     Const RASTERCAPS = 38    '  Bitblt capabilities
  600.     Const ASPECTX = 40   '  Length of the X leg
  601.     Const ASPECTY = 42   '  Length of the Y leg
  602.     Const ASPECTXY = 44  '  Length of the hypotenuse
  603.  
  604.     Const LOGPIXELSX = 88    '  Logical pixels/inch in X
  605.     Const LOGPIXELSY = 90    '  Logical pixels/inch in Y
  606.  
  607.     Const SIZEPALETTE = 104  '  Number of entries in physical palette
  608.     Const NUMRESERVED = 106  '  Number of reserved entries in palette
  609.     Const COLORRES = 108 '  Actual color resolution
  610.  
  611.  
  612.     '  Device Capability Masks:
  613.  
  614.     '  Device Technologies
  615.     Const DT_PLOTTER = 0 '  Vector plotter
  616.     Const DT_RASDISPLAY = 1  '  Raster display
  617.     Const DT_RASPRINTER = 2  '  Raster printer
  618.     Const DT_RASCAMERA = 3   '  Raster camera
  619.     Const DT_CHARSTREAM = 4  '  Character-stream, PLP
  620.     Const DT_METAFILE = 5    '  Metafile, VDM
  621.     Const DT_DISPFILE = 6    '  Display-file
  622.  
  623.     '  Curve Capabilities
  624.     Const CC_NONE = 0    '  Curves not supported
  625.     Const CC_CIRCLES = 1 '  Can do circles
  626.     Const CC_PIE = 2 '  Can do pie wedges
  627.     Const CC_CHORD = 4   '  Can do chord arcs
  628.     Const CC_ELLIPSES = 8    '  Can do ellipese
  629.     Const CC_WIDE = 16   '  Can do wide lines
  630.     Const CC_STYLED = 32 '  Can do styled lines
  631.     Const CC_WIDESTYLED = 64 '  Can do wide styled lines
  632.     Const CC_INTERIORS = 128 '  Can do interiors
  633.  
  634.     '  Line Capabilities
  635.     Const LC_NONE = 0    '  Lines not supported
  636.     Const LC_POLYLINE = 2    '  Can do polylines
  637.     Const LC_MARKER = 4  '  Can do markers
  638.     Const LC_POLYMARKER = 8  '  Can do polymarkers
  639.     Const LC_WIDE = 16   '  Can do wide lines
  640.     Const LC_STYLED = 32 '  Can do styled lines
  641.     Const LC_WIDESTYLED = 64 '  Can do wide styled lines
  642.     Const LC_INTERIORS = 128 '  Can do interiors
  643.  
  644.     '  Polygonal Capabilities
  645.     Const PC_NONE = 0    '  Polygonals not supported
  646.     Const PC_POLYGON = 1 '  Can do polygons
  647.     Const PC_RECTANGLE = 2   '  Can do rectangles
  648.     Const PC_WINDPOLYGON = 4 '  Can do winding polygons
  649.     Const PC_TRAPEZOID = 4   '  Can do trapezoids
  650.     Const PC_SCANLINE = 8    '  Can do scanlines
  651.     Const PC_WIDE = 16   '  Can do wide borders
  652.     Const PC_STYLED = 32 '  Can do styled borders
  653.     Const PC_WIDESTYLED = 64 '  Can do wide styled borders
  654.     Const PC_INTERIORS = 128 '  Can do interiors
  655.  
  656.     '  Polygonal Capabilities
  657.     Const CP_NONE = 0    '  No clipping of output
  658.     Const CP_RECTANGLE = 1   '  Output clipped to rects
  659.  
  660.     '  Text Capabilities
  661.     Const TC_OP_CHARACTER = &H1  '  Can do OutputPrecision   CHARACTER
  662.     Const TC_OP_STROKE = &H2 '  Can do OutputPrecision   STROKE
  663.     Const TC_CP_STROKE = &H4 '  Can do ClipPrecision STROKE
  664.     Const TC_CR_90 = &H8 '  Can do CharRotAbility    90
  665.     Const TC_CR_ANY = &H10   '  Can do CharRotAbility    ANY
  666.     Const TC_SF_X_YINDEP = &H20  '  Can do ScaleFreedom  X_YINDEPENDENT
  667.     Const TC_SA_DOUBLE = &H40    '  Can do ScaleAbility  DOUBLE
  668.     Const TC_SA_INTEGER = &H80   '  Can do ScaleAbility  INTEGER
  669.     Const TC_SA_CONTIN = &H100   '  Can do ScaleAbility  CONTINUOUS
  670.     Const TC_EA_DOUBLE = &H200   '  Can do EmboldenAbility   DOUBLE
  671.     Const TC_IA_ABLE = &H400 '  Can do ItalisizeAbility  ABLE
  672.     Const TC_UA_ABLE = &H800 '  Can do UnderlineAbility  ABLE
  673.     Const TC_SO_ABLE = &H1000    '  Can do StrikeOutAbility  ABLE
  674.     Const TC_RA_ABLE = &H2000    '  Can do RasterFontAble    ABLE
  675.     Const TC_VA_ABLE = &H4000    '  Can do VectorFontAble    ABLE
  676.     Const TC_RESERVED = &H8000
  677.  
  678.     '  Raster Capabilities
  679.     Const RC_BITBLT = 1  '  Can do standard BLT.
  680.     Const RC_BANDING = 2 '  Device requires banding support
  681.     Const RC_SCALING = 4 '  Device requires scaling support
  682.     Const RC_BITMAP64 = 8    '  Device can support >64K bitmap
  683.     Const RC_GDI20_OUTPUT = &H10 '  has 2.0 output calls
  684.     Const RC_DI_BITMAP = &H80    '  supports DIB to memory
  685.     Const RC_PALETTE = &H100 '  supports a palette
  686.     Const RC_DIBTODEV = &H200    '  supports DIBitsToDevice
  687.     Const RC_BIGFONT = &H400 '  supports >64K fonts
  688.     Const RC_STRETCHBLT = &H800  '  supports StretchBlt
  689.     Const RC_FLOODFILL = &H1000  '  supports FloodFill
  690.     Const RC_STRETCHDIB = &H2000 '  supports StretchDIBits
  691.  
  692.     '  palette entry flags
  693.     Const PC_RESERVED = &H1  '  palette index used for animation
  694.     Const PC_EXPLICIT = &H2  '  palette index is explicit to device
  695.     Const PC_NOCOLLAPSE = &H4    '  do not match color to system palette
  696.  
  697.     '  DIB color table identifiers
  698.     Const DIB_RGB_COLORS = 0 '  color table in RGBTriples
  699.     Const DIB_PAL_COLORS = 1 '  color table in palette indices
  700.  
  701.     '  constants for Get/SetSystemPaletteUse()
  702.     Const SYSPAL_STATIC = 1
  703.     Const SYSPAL_NOSTATIC = 2
  704.  
  705.     '  constants for CreateDIBitmap
  706.     Const CBM_INIT = &H4    '  initialize bitmap
  707.  
  708.     '  DrawText() Format Flags
  709.     Const DT_TOP = &H0
  710.     Const DT_LEFT = &H0
  711.     Const DT_CENTER = &H1
  712.     Const DT_RIGHT = &H2
  713.     Const DT_VCENTER = &H4
  714.     Const DT_BOTTOM = &H8
  715.     Const DT_WORDBREAK = &H10
  716.     Const DT_SINGLELINE = &H20
  717.     Const DT_EXPANDTABS = &H40
  718.     Const DT_TABSTOP = &H80
  719.     Const DT_NOCLIP = &H100
  720.     Const DT_EXTERNALLEADING = &H200
  721.     Const DT_CALCRECT = &H400
  722.     Const DT_NOPREFIX = &H800
  723.     Const DT_INTERNAL = &H1000
  724.  
  725.     Declare Function DrawText Lib "User" (hDC%, lpStr$, nCount%, lpRect As RECT, wFormat%) As Integer
  726.     Declare Function DrawIcon Lib "User" (hDC%, X%, Y%, hIcon%) As Integer
  727.  
  728.     '  ExtFloodFill style flags
  729.     Const FLOODFILLBORDER = 0
  730.     Const FLOODFILLSURFACE = 1
  731.  
  732.     Declare Function GetWindowDC Lib "User" (hWnd%) As Integer
  733.     Declare Function GetDC Lib "User" (hWnd%) As Integer
  734.     Declare Function ReleaseDC Lib "User" (hWnd%, hDC%) As Integer
  735.  
  736.     Declare Function CreateDC Lib "GDI" (lpDriverName$, lpDeviceName$, lpOutput$, lpInitData$) As Integer
  737.     Declare Function CreateIC Lib "GDI" (lpDriverName$, lpDeviceName$, lpOutput$, lpInitData$) As Integer
  738.     Declare Function CreateCompatibleDC Lib "GDI" (hDC%) As Integer
  739.     Declare Function DeleteDC Lib "GDI" (hDC%) As Integer
  740.     Declare Function SaveDC Lib "GDI" (hDC%) As Integer
  741.     Declare Function RestoreDC Lib "GDI" (hDC%, nSavedDC%) As Integer
  742.     Declare Function MoveTo Lib "GDI" (hDC%, X%, Y%) As Long
  743.     Declare Function GetCurrentPosition Lib "GDI" (hDC%) As Long
  744.     Declare Function LineTo Lib "GDI" (hDC%, X%, Y%) As Integer
  745.     Declare Function GetDCOrg Lib "GDI" (hDC%) As Long
  746.  
  747.     Declare Function MulDiv Lib "GDI" (nNumber%, nNumerator%, nDenominator%) As Integer
  748.  
  749.     Declare Function ExtTextOut Lib "GDI" (hDC%, X%, Y%, wOptions%, lpRect As Any, lpString$, nCount%, lpDx As Any) As Integer
  750.  
  751.     Declare Function Polyline Lib "GDI" (hDC%, lpPoints As POINT, nCount%) As Integer
  752.     Declare Function Polygon Lib "GDI" (hDC%, lpPoints As POINT, nCount%) As Integer
  753.     Declare Function PolyPolygon Lib "GDI" (hDC%, lpPoints As POINT, lpPolyCounts%, nCount%) As Integer
  754.  
  755.     Declare Function Rectangle Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%) As Integer
  756.     Declare Function RoundRect Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%, X3%, Y3%) As Integer
  757.     Declare Function Ellipse Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%) As Integer
  758.     Declare Function Arc Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%, X3%, Y3%, X4%, Y4%) As Integer
  759.     Declare Function Chord Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%, X3%, Y3%, X4%, Y4%) As Integer
  760.     Declare Function Pie Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%, X3%, Y3%, X4%, Y4%) As Integer
  761.     Declare Function PatBlt Lib "GDI" (hDC%, X%, Y%, nWidth%, nHeight%, dwRop&) As Integer
  762.     Declare Function BitBlt Lib "GDI" (hDestDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, XSrc%, YSrc%, dwRop&) As Integer
  763.     Declare Function StretchBlt% Lib "GDI" (hDC%, X%, Y%, nWidth%, nHeight%, hSrcDC%, XSrc%, YSrc%, nSrcWidth%, nSrcHeight%, dwRop&)
  764.     Declare Function TextOut Lib "GDI" (hDC%, X%, Y%, lpString$, nCount%) As Integer
  765.     Declare Function TabbedTextOut Lib "GDI" (hDC%, X%, Y%, lpString$, nCount%, nTabPositions%, lpnTabStopPositions%, nTabOrigin%) As Long
  766.     Declare Function GetCharWidth Lib "GDI" (hDC%, wFirstChar%, wLastChar%, lpBuffer%) As Integer
  767.     Declare Function SetPixel Lib "GDI" (hDC%, X%, Y%, crColor&) As Long
  768.     Declare Function GetPixel Lib "GDI" (hDC%, X%, Y%) As Long
  769.     Declare Function FloodFill Lib "GDI" (hDC%, X%, Y%, crColor&) As Integer
  770.     Declare Function ExtFloodFill Lib "GDI" (hDC%, X%, Y%, crColor&, wFillType%) As Integer
  771.  
  772.     Declare Function GetStockObject Lib "GDI" (nIndex%) As Integer
  773.  
  774.     Declare Function CreatePen Lib "GDI" (nPenStyle%, nWidth%, crColor&) As Integer
  775.     Declare Function CreatePenIndirect Lib "GDI" (lpLogPen As LOGPEN) As Integer
  776.  
  777.     Declare Function CreateSolidBrush Lib "GDI" (crColor&) As Integer
  778.     Declare Function CreateHatchBrush Lib "GDI" (nIndex%, crColor&) As Integer
  779.     Declare Function SetBrushOrg Lib "GDI" (hDC%, X%, Y%) As Long
  780.     Declare Function GetBrushOrg Lib "GDI" (hDC%) As Long
  781.     Declare Function CreatePatternBrush Lib "GDI" (hBitmap%) As Integer
  782.     Declare Function CreateBrushIndirect Lib "GDI" (lpLogBrush As LOGBRUSH) As Integer
  783.  
  784.     Declare Function CreateBitmap Lib "GDI" (nWidth%, nHeight%, nPlanes%, nBitCount%, lpBits As Any) As Integer
  785.     Declare Function CreateBitmapIndirect Lib "GDI" (lpBitmap As BITMAP) As Integer
  786.     Declare Function CreateCompatibleBitmap Lib "GDI" (hDC%, nWidth%, nHeight%) As Integer
  787.     Declare Function CreateDiscardableBitmap Lib "GDI" (hDC%, nWidth%, nHeight%) As Integer
  788.  
  789.     Declare Function SetBitmapBits Lib "GDI" (hBitmap%, dwCount&, lpBits As Any) As Long
  790.     Declare Function GetBitmapBits Lib "GDI" (hBitmap%, dwCount&, lpBits As Any) As Long
  791.     Declare Function SetBitmapDimension Lib "GDI" (hBitmap%, X%, Y%) As Long
  792.     Declare Function GetBitmapDimension Lib "GDI" (hBitmap%) As Long
  793.  
  794.     Declare Function CreateFont% Lib "GDI" (H%, W%, E%, O%, W%, I%, U%, S%, C%, OP%, CP%, Q%, PAF%, F$)
  795.     Declare Function CreateFontIndirect Lib "GDI" (lpLogFont As LOGFONT) As Integer
  796.  
  797.     Declare Function SelectClipRgn Lib "GDI" (hDC%, hRgn%) As Integer
  798.     Declare Function CreateRectRgn Lib "GDI" (X1%, Y1%, X2%, Y2%) As Integer
  799.     Declare Sub SetRectRgn Lib "GDI" (hRgn%, X1%, Y1%, X2%, Y2%)
  800.     Declare Function CreateRectRgnIndirect Lib "GDI" (lpRect As RECT) As Integer
  801.     Declare Function CreateEllipticRgnIndirect Lib "GDI" (lpRect As RECT) As Integer
  802.     Declare Function CreateEllipticRgn Lib "GDI" (X1%, Y1%, X2%, Y2%) As Integer
  803.     Declare Function CreatePolygonRgn Lib "GDI" (lpPoints As POINT, nCount%, nPolyFillMode%) As Integer
  804.     Declare Function CreatePolyPolygonRgn Lib "GDI" (lpPoints As POINT, lpPolyCounts%, nCount%, nPolyFillMode%) As Integer
  805.     Declare Function CreateRoundRectRgn Lib "GDI" (X1%, Y1%, X2%, Y2%, X3%, Y3%) As Integer
  806.  
  807.     Declare Function GetObject Lib "GDI" (hObject%, nCount%, lpObject&) As Integer
  808.     Declare Function DeleteObject Lib "GDI" (hObject%) As Integer
  809.     Declare Function SelectObject Lib "GDI" (hDC%, hObject%) As Integer
  810.     Declare Function UnrealizeObject Lib "GDI" (hObject%) As Integer
  811.  
  812.     Declare Function SetBkColor Lib "GDI" (hDC%, crColor&) As Long
  813.     Declare Function GetBkColor Lib "GDI" (hDC%) As Long
  814.     Declare Function SetBkMode Lib "GDI" (hDC%, nBkMode%) As Integer
  815.     Declare Function GetBkMode Lib "GDI" (hDC%) As Integer
  816.     Declare Function SetTextColor Lib "GDI" (hDC%, crColor&) As Long
  817.     Declare Function GetTextColor Lib "GDI" (hDC%) As Long
  818.     Declare Function SetTextAlign Lib "GDI" (hDC%, wFlags%) As Integer
  819.     Declare Function GetTextAlign Lib "GDI" (hDC%) As Integer
  820.     Declare Function SetMapperFlags Lib "GDI" (hDC%, dwFlag&) As Long
  821.     Declare Function GetAspectRatioFilter Lib "GDI" (hDC%) As Long
  822.     Declare Function GetNearestColor Lib "GDI" (hDC%, crColor&) As Long
  823.     Declare Function SetROP2 Lib "GDI" (hDC%, nDrawMode%) As Integer
  824.     Declare Function GetROP2 Lib "GDI" (hDC%) As Integer
  825.     Declare Function SetStretchBltMode Lib "GDI" (hDC%, nStretchMode%) As Integer
  826.     Declare Function GetStretchBltMode Lib "GDI" (hDC%) As Integer
  827.     Declare Function SetPolyFillMode Lib "GDI" (hDC%, nPolyFillMode%) As Integer
  828.     Declare Function GetPolyFillMode Lib "GDI" (hDC%) As Integer
  829.     Declare Function SetMapMode Lib "GDI" (hDC%, nMapMode%) As Integer
  830.     Declare Function GetMapMode Lib "GDI" (hDC%) As Integer
  831.     Declare Function SetWindowOrg Lib "GDI" (hDC%, X%, Y%) As Long
  832.     Declare Function GetWindowOrg Lib "GDI" (hDC%) As Long
  833.     Declare Function SetWindowExt Lib "GDI" (hDC%, X%, Y%) As Long
  834.     Declare Function GetWindowExt Lib "GDI" (hDC%) As Long
  835.     Declare Function SetViewportOrg Lib "GDI" (hDC%, X%, Y%) As Long
  836.     Declare Function GetViewportOrg Lib "GDI" (hDC%) As Long
  837.     Declare Function SetViewportExt Lib "GDI" (hDC%, X%, Y%) As Long
  838.     Declare Function GetViewportExt Lib "GDI" (hDC%) As Long
  839.     Declare Function OffsetViewportOrg Lib "GDI" (hDC%, X%, Y%) As Long
  840.     Declare Function ScaleViewportExt Lib "GDI" (hDC%, Xnum%, Xdenom%, Ynum%, Ydenom%) As Long
  841.     Declare Function OffsetWindowOrg Lib "GDI" (hDC%, X%, Y%) As Long
  842.     Declare Function ScaleWindowExt Lib "GDI" (hDC%, Xnum%, Xdenom%, Ynum%, Ydenom%) As Long
  843.  
  844.     Declare Function GetClipBox Lib "GDI" (hDC%, lpRect As RECT) As Integer
  845.     Declare Function IntersectClipRect Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%) As Integer
  846.     Declare Function OffsetClipRgn Lib "GDI" (hDC%, X%, Y%) As Integer
  847.     Declare Function ExcludeClipRect Lib "GDI" (hDC%, X1%, Y1%, X2%, Y2%) As Integer
  848.     Declare Function PtVisible Lib "GDI" (hDC%, X%, Y%) As Integer
  849.     Declare Function CombineRgn Lib "GDI" (hDestRgn%, hSrcRgn1%, hSrcRgn2%, nCombineMode%) As Integer
  850.     Declare Function EqualRgn Lib "GDI" (hSrcRgn1%, hSrcRgn2%) As Integer
  851.     Declare Function OffsetRgn Lib "GDI" (hRgn%, X%, Y%) As Integer
  852.     Declare Function GetRgnBox Lib "GDI" (hRgn%, lpRect As RECT) As Integer
  853.  
  854.     Declare Function SetTextJustification Lib "GDI" (hDC%, nBreakExtra%, nBreakCount%) As Integer
  855.     Declare Function GetTextExtent Lib "GDI" (hDC%, lpString$, nCount%) As Long
  856.     Declare Function GetTabbedTextExtent Lib "GDI" (hDC%, lpString$, nCount%, nTabPositions%, lpnTabStopPositions%) As Long
  857.     Declare Function SetTextCharacterExtra Lib "GDI" (hDC%, nCharExtra%) As Integer
  858.     Declare Function GetTextCharacterExtra Lib "GDI" (hDC%) As Integer
  859.  
  860.     Declare Function GetMetaFile Lib "GDI" (lpFilename$) As Integer
  861.     Declare Function DeleteMetaFile Lib "GDI" (hMF%) As Integer
  862.     Declare Function CopyMetaFile Lib "GDI" (hMF%, lpFilename$) As Integer
  863.  
  864.     Declare Function PlayMetaFile Lib "GDI" (hDC%, hMF%) As Integer
  865.     Declare Sub PlayMetaFileRecord Lib "GDI" (hDC%, lpHandletable%, lpMetaRecord As METARECORD, nHandles%)
  866.     Declare Function Escape Lib "GDI" (hDC%, nEscape%, nCount%, lplnData As Any, lpOutData As Any) As Integer
  867.     Declare Function GetTextFace Lib "GDI" (hDC%, nCount%, lpFacename$) As Integer
  868.  
  869.     Declare Function GetTextMetrics Lib "GDI" (hDC%, lpMetrics As TEXTMETRIC) As Integer
  870.  
  871.     Declare Function GetDeviceCaps Lib "GDI" (hDC%, nIndex%) As Integer
  872.  
  873.     Declare Function SetEnvironment Lib "GDI" (lpPortName$, lpEnviron$, nCount%) As Integer
  874.     Declare Function GetEnvironment Lib "GDI" (lpPortName$, lpEnviron As Any, nMaxCount%) As Integer
  875.  
  876.     Declare Function DPtoLP Lib "GDI" (hDC%, lpPoints As POINT, nCount%) As Integer
  877.     Declare Function LPtoDP Lib "GDI" (hDC%, lpPoints As POINT, nCount%) As Integer
  878.  
  879.     Declare Function CreateMetaFile Lib "GDI" (lpString As Any) As Integer
  880.     Declare Function CloseMetaFile Lib "GDI" (hMF%) As Integer
  881.     Declare Function GetMetaFileBits Lib "GDI" (hMF%) As Integer
  882.     Declare Function SetMetaFileBits Lib "GDI" (hMem%) As Integer
  883.  
  884.     Declare Function SetDIBits Lib "GDI" (aHDC%, hBitmap%, nStartScan%, nNumScans%, lpBits$, lpBI As BITMAPINFO, wUsage%) As Integer
  885.  
  886.     Declare Function GetDIBits Lib "GDI" (aHDC%, hBitmap%, nStartScan%, nNumScans%, lpBits$, lpBI As BITMAPINFO, wUsage%) As Integer
  887.  
  888.     Declare Function SetDIBitsToDevice% Lib "GDI" (hDC%, X%, Y%, dX%, dY%, SrcX%, SrcY%, Scan%, NumScans%, Bits$, BitsInfo As BITMAPINFO, wUsage%)
  889.  
  890.     Declare Function CreateDIBitmap Lib "GDI" (hDC%, lpInfoHeader As BITMAPINFOHEADER, dwUsage&, lpInitBits$, lpInitInfo As BITMAPINFO, wUsage%) As Integer
  891.  
  892.     Declare Function CreateDIBPatternBrush Lib "GDI" (hPackedDIB%, wUsage%) As Integer
  893.  
  894.     Declare Function StretchDIBits& Lib "GDI" (hDC%, X%, Y%, dX&, dY%, SrcX%, SrcY%, wSrcWidth%, wSrcHeight%, lpBits$, lpBitsInfo As BITMAPINFO, wUsage%, dwRop&)
  895.  
  896.  
  897.     Declare Function CreatePalette Lib "GDI" (lpLogPalette As LOGPALETTE) As Integer
  898.     Declare Function SelectPalette Lib "GDI" (hDC%, hPalette%, bForceBackground%) As Integer
  899.     Declare Function RealizePalette Lib "GDI" (hDC%) As Integer
  900.     Declare Function UpdateColors Lib "GDI" (hDC%) As Integer
  901.     Declare Sub AnimatePalette Lib "GDI" (hPalette%, wStartIndex%, wNumEntries%, lpPaletteColors As PALETTEENTRY)
  902.     Declare Function SetPaletteEntries Lib "GDI" (hPalette%, wStartIndex%, wNumEntries%, lpPaletteEntries As PALETTEENTRY) As Integer
  903.     Declare Function GetPaletteEntries Lib "GDI" (hPalette%, wStartIndex%, wNumEntries%, lpPaletteEntries As PALETTEENTRY) As Integer
  904.     Declare Function GetNearestPaletteIndex Lib "GDI" (hPalette%, crColor&) As Integer
  905.     Declare Function ResizePalette Lib "GDI" (hPalette%, nNumEntries%) As Integer
  906.  
  907.     Declare Function GetSystemPaletteEntries Lib "GDI" (hDC%, wStartIndex%, wNumEntries%, lpPaletteEntries As PALETTEENTRY) As Integer
  908.     Declare Function GetSystemPaletteUse Lib "GDI" (hDC%) As Integer
  909.     Declare Function SetSystemPaletteUse Lib "GDI" (hDC%, wUsage%) As Integer
  910.  
  911. '$ENDIF
  912.  
  913.