source: trunk/Include/api_gdi.sbp@ 362

Last change on this file since 362 was 300, checked in by dai, 17 years ago

trunkディレクトリを作成。bin、Include、TestCaseをtrunkに移動した。
標準ライブラリのビルドバッチを追加。

File size: 51.2 KB
RevLine 
[1]1' api_gdi.sbp - Graphics Device Integerface API
2
3
4#ifndef _INC_GDI
5#define _INC_GDI
6
[137]7#ifdef UNICODE
[141]8Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileW"
9Const _FuncName_CopyMetaFile = "CopyMetaFileW"
10Const _FuncName_CreateDC = "CreateDCW"
11Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileW"
12Const _FuncName_CreateMetaFile = "CreateMetaFileW"
13Const _FuncName_CreateFont = "CreateFontW"
[137]14Const _FuncName_CreateFontIndirect = "CreateFontIndirectW"
[141]15Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileW"
16Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionW"
17Const _FuncName_GetObject = "GetObjectW"
[160]18Const _FuncName_GetTextFace = "GetTextFaceW"
[141]19Const _FuncName_GetTextMetrics = "GetTextMetricsW"
20Const _FuncName_ResetDC = "ResetDCW"
21Const _FuncName_StartDoc = "StartDocW"
22Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsW"
23Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesW"
[137]24#else
[141]25Const _FuncName_CopyEnhMetaFile = "CopyEnhMetaFileA"
26Const _FuncName_CopyMetaFile = "CopyMetaFileA"
27Const _FuncName_CreateDC = "CreateDCA"
28Const _FuncName_CreateEnhMetaFile = "CreateEnhMetaFileA"
29Const _FuncName_CreateMetaFile = "CreateMetaFileA"
30Const _FuncName_CreateFont = "CreateFontA"
[137]31Const _FuncName_CreateFontIndirect = "CreateFontIndirectA"
[141]32Const _FuncName_GetEnhMetaFile = "GetEnhMetaFileA"
33Const _FuncName_GetEnhMetaFileDescription = "GetEnhMetaFileDescriptionA"
34Const _FuncName_GetObject = "GetObjectA"
[160]35Const _FuncName_GetTextFace = "GetTextFaceA"
[141]36Const _FuncName_GetTextMetrics = "GetTextMetricsA"
37Const _FuncName_ResetDC = "ResetDCA"
38Const _FuncName_StartDoc = "StartDocA"
39Const _FuncName_wglUseFontBitmaps = "wglUseFontBitmapsA"
40Const _FuncName_wglUseFontOutlines = "wglUseFontOutlinesA"
[137]41#endif
[1]42
43Const CLR_INVALID = &HFFFFFFFF
44Const GDI_ERROR = &HFFFFFFFF
45
[123]46TypeDef BCHAR = TBYTE
[1]47
[123]48' Metafile and EnhancedMetafile
49Type EMR
50 iType As DWord
51 nSize As DWord
52End Type
53
[1]54Type Align(2) METAHEADER
55 mtType As Word
56 mtHeaderSize As Word
57 mtVersion As Word
58 mtSize As DWord
59 mtNoObjects As Word
60 mtMaxRecord As DWord
61 mtNoParameters As Word
62End Type
63TypeDef PMETAHEADER = *METAHEADER
64
[123]65Type ENHMETAHEADER
66 iType As DWord
67 nSize As DWord
68 rclBounds As RECT
69 rclFrame As RECT
70 dSignature As DWord
71 nVersion As DWord
72 nBytes As DWord
73 nRecords As DWord
74 nHandles As Word
75 sReserved As Word
76 nDescription As DWord
77 offDescription As DWord
78 nPalEntries As DWord
79 szlDevice As SIZE
80 szlMillimeters As SIZE
81 cbPixelFormat As DWord
82 offPixelFormat As DWord
83 bOpenGL As DWord
84'#if WINVER >= 0x0500
85 'szlMicrometers As SIZE
86'#endif
87End Type
88TypeDef PENHMETAHEADER = *ENHMETAHEADER
89
90Type HANDLETABLE
91 objectHandle[ELM(1)] As HGDIOBJ
92End Type
93
94Type METARECORD
95 rdSize As DWord
96 rdFunction As Word
97 rdParm[ELM(1)] As Word
98End Type
99
100Type ENHMETARECORD
101 iType As DWord
102 nSize As DWord
103 dParm[ELM(1)] As DWord
104End Type
105
106Type METAFILEPICT
107 mm As Long
108 xExt As Long
109 yExt As Long
110 hMF As HMETAFILE
111End Type
112
113TypeDef ENHMFENUMPROC = *Function(hdc As HDC, ByRef HTable As HANDLETABLE, ByRef EMFR As ENHMETARECORD, nObj As Long, lpData As LPARAM) As Long
[176]114TypeDef MFENUMPROC = *Function(hdc As HDC, ByRef HTable As HANDLETABLE, ByRef MFR As METARECORD, nObj As Long, lpClientData As LPARAM) As Long
[123]115
116
117' RGB Color
[1]118Const RGB(r, g, b) = ((r) As Long) Or (((g) As Long) <<8) Or (((b) As Long) <<16)
[123]119Const PALETTERGB(r, g, b) = (&h02000000 Or RGB(r,g,b))
120Const PALETTEINDEX(i) = ((&h01000000 Or (i) As Word As DWord) As COLORREF)
121
[1]122Const GetRValue(rgb) = (rgb And &hff)
123Const GetGValue(rgb) = ((rgb >> 8) And &hff)
124Const GetBValue(rgb) = ((rgb >> 16) And &hff)
125
126Type RGBQUAD
127 rgbBlue As Byte
128 rgbGreen As Byte
129 rgbRed As Byte
130 rgbReserved As Byte
131End Type
132
[123]133Type Align(1) RGBTRIPLE
134 rgbtBlue As Byte
135 rgbtGreen As Byte
136 rgbtRed As Byte
137End Type
[1]138
[123]139' CMYK Color
140Const GetKValue(cmyk) = ((cmyk) As Byte)
141Const GetYValue(cmyk) = (((cmyk) >> 8) As Byte)
142Const GetMValue(cmyk) = (((cmyk) >> 16) As Byte)
143Const GetCValue(cmyk) = (((cmyk) >> 24) As Byte)
144
145Const CMYK(c, m, y, k) = (( _
146 ((k) As Byte) Or _
147 ((y) As Byte As Word << 8) Or _
148 ((m) As Byte As DWord << 16) Or _
149 ((c) As Byte As DWord << 24)) As COLORREF)
150
151' ICM Color
152TypeDef FXPT16DOT16 = Long
153TypeDef FXPT2DOT30 = Long
154
155TypeDef LCSCSTYPE = Long
156TypeDef LCSGAMUTMATCH = Long
157
158Type LOGCOLORSPACEA
159 lcsSignature As DWord
160 lcsVersion As DWord
161 lcsSize As DWord
162 lcsCSType As LCSCSTYPE
163 lcsIntent As LCSGAMUTMATCH
164 lcsEndpoints As CIEXYZTRIPLE
165 lcsGammaRed As DWord
166 lcsGammaGreen As DWord
167 lcsGammaBlue As DWord
168 lcsFilename[MAX_PATH] As SByte
169End Type
170Type LOGCOLORSPACEW
171 lcsSignature As DWord
172 lcsVersion As DWord
173 lcsSize As DWord
174 lcsCSType As LCSCSTYPE
175 lcsIntent As LCSGAMUTMATCH
176 lcsEndpoints As CIEXYZTRIPLE
177 lcsGammaRed As DWord
178 lcsGammaGreen As DWord
179 lcsGammaBlue As DWord
180 lcsFilename[ELM(MAX_PATH)] As WCHAR
181End Type
182#ifdef UNICODE
183TypeDef LOGCOLORSPACE = LOGCOLORSPACEW
184#else
185TypeDef LOGCOLORSPACE = LOGCOLORSPACEA
186#endif
187
188Type CIEXYZ
189 ciexyzX As FXPT2DOT30
190 ciexyzY As FXPT2DOT30
191 ciexyzZ As FXPT2DOT30
192End Type
193
194Type CIEXYZTRIPLE
195 ciexyzRed As CIEXYZ
196 ciexyzGreen As CIEXYZ
197 ciexyzBlue As CIEXYZ
198End Type
199
[223]200Type LOGPALETTE
201 palVersion As Word
202 palNumEntries As Word
203 palPalEntry[ELM(1)] As PALETTEENTRY
204End Type
[123]205
[1]206' raster operations
207Const SRCCOPY = &H00CC0020
208Const SRCPAINT = &H00EE0086
209Const SRCAND = &H008800C6
210Const SRCINVERT = &H00660046
211Const SRCERASE = &H00440328
212Const NOTSRCCOPY = &H00330008
213Const NOTSRCERASE = &H001100A6
214Const MERGECOPY = &H00C000CA
215Const MERGEPAINT = &H00BB0226
216Const PATCOPY = &H00F00021
217Const PATPAINT = &H00FB0A09
218Const PATINVERT = &H005A0049
219Const DSTINVERT = &H00550009
220Const BLACKNESS = &H00000042
221Const WHITENESS = &H00FF0062
222
223
224' Object types
225Const OBJ_PEN = 1
226Const OBJ_BRUSH = 2
227Const OBJ_DC = 3
228Const OBJ_METADC = 4
229Const OBJ_PAL = 5
230Const OBJ_FONT = 6
231Const OBJ_BITMAP = 7
232Const OBJ_REGION = 8
233Const OBJ_METAFILE = 9
234Const OBJ_MEMDC = 10
235Const OBJ_EXTPEN = 11
236Const OBJ_ENHMETADC = 12
237Const OBJ_ENHMETAFILE = 13
238
239
240' Bitmap Header Definition
241Type BITMAP
242 bmType As Long
243 bmWidth As Long
244 bmHeight As Long
245 bmWidthBytes As Long
246 bmPlanes As Word
247 bmBitsPixel As Word
248 bmBits As VoidPtr
249End Type
250
[123]251Type BITMAPCOREHEADER
252 bcSize As DWord
253 bcWidth As Word
254 bcHeight As Word
255 bcPlanes As Word
256 bcBitCount As Word
257End Type
[1]258
[123]259Type BITMAPCOREINFO
260 bmciHeader As BITMAPCOREHEADER
261 bmciColors[ELM(1)] As RGBTRIPLE
262End Type
263
[1]264' structures for defining DIBs
265Const BI_RGB = 0
266Const BI_RLE8 = 1
267Const BI_RLE4 = 2
268Const BI_BITFIELDS = 3
269Const BI_JPEG = 4
270Const BI_PNG = 5
[123]271
[1]272Type BITMAPINFOHEADER
273 biSize As DWord
274 biWidth As Long
275 biHeight As Long
276 biPlanes As Word
277 biBitCount As Word
278 biCompression As DWord
279 biSizeImage As DWord
280 biXPelsPerMeter As Long
281 biYPelsPerMeter As Long
282 biClrUsed As DWord
283 biClrImportant As DWord
284End Type
[123]285
[1]286Type BITMAPINFO
287 bmiHeader As BITMAPINFOHEADER
[123]288 bmiColors[ELM(1)] As RGBQUAD '以前はbmpColors[255] As RGBQUADだったことに注意
[1]289End Type
290
291
292' Bitmap file header struct
293Type Align(2) BITMAPFILEHEADER
294 bfType As Word
295 bfSize As DWord
296 bfReserved1 As Word
297 bfReserved2 As Word
298 bfOffBits As DWord
299End Type
300
[123]301Type BITMAPV4HEADER
302 bV4Size As DWord
303 bV4Width As Long
304 bV4Height As Long
305 bV4Planes As Word
306 bV4BitCount As Word
307 bV4V4Compression As DWord
308 bV4SizeImage As DWord
309 bV4XPelsPerMeter As Long
310 bV4YPelsPerMeter As Long
311 bV4ClrUsed As DWord
312 bV4ClrImportant As DWord
313 bV4RedMask As DWord
314 bV4GreenMask As DWord
315 bV4BlueMask As DWord
316 bV4AlphaMask As DWord
317 bV4CSType As DWord
318 bV4Endpoints As CIEXYZTRIPLE
319 bV4GammaRed As DWord
320 bV4GammaGreen As DWord
321 bV4GammaBlue As DWord
322End Type
[1]323
324' Region flags
325Const NULLREGION = 1
326Const SIMPLEREGION = 2
327Const COMPLEXREGION = 3
328
329
330' Poly fill mode
331Const ALTERNATE = 1
332Const WINDING = 2
333
334
335' Device mode
336Const DM_ORIENTATION = &H00000001
337Const DM_PAPERSIZE = &H00000002
338Const DM_PAPERLENGTH = &H00000004
339Const DM_PAPERWIDTH = &H00000008
340Const DM_SCALE = &H00000010
341Const DM_POSITION = &H00000020
342Const DM_COPIES = &H00000100
343Const DM_DEFAULTSOURCE = &H00000200
344Const DM_PRINTQUALITY = &H00000400
345Const DM_COLOR = &H00000800
346Const DM_DUPLEX = &H00001000
347Const DM_YRESOLUTION = &H00002000
348Const DM_TTOPTION = &H00004000
349Const DM_COLLATE = &H00008000
350Const DM_FORMNAME = &H00010000
351Const DM_LOGPIXELS = &H00020000
352Const DM_BITSPERPEL = &H00040000
353Const DM_PELSWIDTH = &H00080000
354Const DM_PELSHEIGHT = &H00100000
355Const DM_DISPLAYFLAGS = &H00200000
356Const DM_DISPLAYFREQUENCY = &H00400000
357Const DMORIENT_PORTRAIT = 1
358Const DMORIENT_LANDSCAPE = 2
359Const DMPAPER_LETTER = 1
360Const DMPAPER_LETTERSMALL = 2
361Const DMPAPER_TABLOID = 3
362Const DMPAPER_LEDGER = 4
363Const DMPAPER_LEGAL = 5
364Const DMPAPER_STATEMENT = 6
365Const DMPAPER_EXECUTIVE = 7
366Const DMPAPER_A3 = 8
367Const DMPAPER_A4 = 9
368Const DMPAPER_A4SMALL = 10
369Const DMPAPER_A5 = 11
370Const DMPAPER_B4 = 12
371Const DMPAPER_B5 = 13
372Const DMPAPER_FOLIO = 14
373Const DMPAPER_QUARTO = 15
374Const DMPAPER_10X14 = 16
375Const DMPAPER_11X17 = 17
376Const DMPAPER_NOTE = 18
377Const DMPAPER_ENV_9 = 19
378Const DMPAPER_ENV_10 = 20
379Const DMPAPER_ENV_11 = 21
380Const DMPAPER_ENV_12 = 22
381Const DMPAPER_ENV_14 = 23
382Const DMPAPER_CSHEET = 24
383Const DMPAPER_DSHEET = 25
384Const DMPAPER_ESHEET = 26
385Const DMPAPER_ENV_DL = 27
386Const DMPAPER_ENV_C5 = 28
387Const DMPAPER_ENV_C3 = 29
388Const DMPAPER_ENV_C4 = 30
389Const DMPAPER_ENV_C6 = 31
390Const DMPAPER_ENV_C65 = 32
391Const DMPAPER_ENV_B4 = 33
392Const DMPAPER_ENV_B5 = 34
393Const DMPAPER_ENV_B6 = 35
394Const DMPAPER_ENV_ITALY = 36
395Const DMPAPER_ENV_MONARCH = 37
396Const DMPAPER_ENV_PERSONAL = 38
397Const DMPAPER_FANFOLD_US = 39
398Const DMPAPER_FANFOLD_STD_GERMAN = 40
399Const DMPAPER_FANFOLD_LGL_GERMAN = 41
400Const DMRES_DRAFT = -1
401Const DMRES_LOW = -2
402Const DMRES_MEDIUM = -3
403Const DMRES_HIGH = -4
404Const DMCOLOR_MONOCHROME = 1
405Const DMCOLOR_COLOR = 2
406Const DMDUP_SIMPLEX = 1
407Const DMDUP_VERTICAL = 2
408Const DMDUP_HORIZONTAL = 3
409Const DMTT_BITMAP = 1
410Const DMTT_DOWNLOAD = 2
411Const DMTT_SUBDEV = 3
412Const DMCOLLATE_FALSE = 0
413Const DMCOLLATE_TRUE = 1
414
415Const CCHFORMNAME = 32
[141]416Type DEVMODEW
417 dmDeviceName[ELM(CCHDEVICENAME)] As WCHAR
[1]418 dmSpecVersion As Word
419 dmDriverVersion As Word
420 dmSize As Word
421 dmDriverExtra As Word
422 dmFields As DWord
423 dmOrientation As Integer
424 dmPaperSize As Integer
425 dmPaperLength As Integer
426 dmPaperWidth As Integer
427 dmScale As Integer
428 dmCopies As Integer
429 dmDefaultSource As Integer
430 dmPrintQuality As Integer
431 dmColor As Integer
432 dmDuplex As Integer
433 dmYResolution As Integer
434 dmTTOption As Integer
435 dmCollate As Integer
[141]436 dmFormName[ELM(CCHFORMNAME)] As WCHAR
[1]437 dmLogPixels As Word
438 dmBitsPerPel As DWord
439 dmPelsWidth As DWord
440 dmPelsHeight As DWord
441 dmDisplayFlags As DWord
442 dmDisplayFrequency As DWord
443 dmICMMethod As DWord
444 dmICMIntent As DWord
445 dmMediaType As DWord
446 dmDitherType As DWord
447 dmReserved1 As DWord
448 dmReserved2 As DWord
449 dmPanningWidth As DWord
450 dmPanningHeight As DWord
451End Type
[141]452Type DEVMODEA
453 dmDeviceName[ELM(CCHDEVICENAME)] As SByte
454 dmSpecVersion As Word
455 dmDriverVersion As Word
456 dmSize As Word
457 dmDriverExtra As Word
458 dmFields As DWord
459 dmOrientation As Integer
460 dmPaperSize As Integer
461 dmPaperLength As Integer
462 dmPaperWidth As Integer
463 dmScale As Integer
464 dmCopies As Integer
465 dmDefaultSource As Integer
466 dmPrintQuality As Integer
467 dmColor As Integer
468 dmDuplex As Integer
469 dmYResolution As Integer
470 dmTTOption As Integer
471 dmCollate As Integer
472 dmFormName[ELM(CCHFORMNAME)] As SByte
473 dmLogPixels As Word
474 dmBitsPerPel As DWord
475 dmPelsWidth As DWord
476 dmPelsHeight As DWord
477 dmDisplayFlags As DWord
478 dmDisplayFrequency As DWord
479 dmICMMethod As DWord
480 dmICMIntent As DWord
481 dmMediaType As DWord
482 dmDitherType As DWord
483 dmReserved1 As DWord
484 dmReserved2 As DWord
485 dmPanningWidth As DWord
486 dmPanningHeight As DWord
487End Type
488#ifdef UNICODE
489TypeDef DEVMODE = DEVMODEW
490#else
[1]491TypeDef DEVMODE = DEVMODEA
[141]492#endif
[1]493
494' Binary raster ops
495Const R2_BLACK = 1
496Const R2_NOTMERGEPEN = 2
497Const R2_MASKNOTPEN = 3
498Const R2_NOTCOPYPEN = 4
499Const R2_MASKPENNOT = 5
500Const R2_NOT = 6
501Const R2_XORPEN = 7
502Const R2_NOTMASKPEN = 8
503Const R2_MASKPEN = 9
504Const R2_NOTXORPEN = 10
505Const R2_NOP = 11
506Const R2_MERGENOTPEN = 12
507Const R2_COPYPEN = 13
508Const R2_MERGEPENNOT = 14
509Const R2_MERGEPEN = 15
510Const R2_WHITE = 16
511
512
513Type RGNDATAHEADER
514 dwSize As DWord
515 iType As DWord
516 nCount As DWord
517 nRgnSize As DWord
518 rcBound As RECT
519End Type
520Type RGNDATA
521 rdh As RGNDATAHEADER
522 Buffer As Byte
523End Type
524
525Type PALETTEENTRY
526 peRed As Byte
527 peGreen As Byte
528 peBlue As Byte
529 peFlags As Byte
530End Type
531
[141]532Type DOCINFOW
[1]533 cbSize As Long
[141]534 lpszDocName As LPCWSTR
535 lpszOutput As LPCWSTR
536 lpszDatatype As LPCWSTR
537 fwType As DWord
538End Type
539Type DOCINFOA
540 cbSize As Long
[1]541 lpszDocName As LPCSTR
542 lpszOutput As LPCSTR
543 lpszDatatype As LPCSTR
544 fwType As DWord
545End Type
[141]546#ifdef UNICODE
547TypeDef DOCINFO = DOCINFOW
548#else
549TypeDef DOCINFO = DOCINFOA
550#endif
[1]551
552'-------------------
553' GDI API Functions
554'-------------------
555
556Declare Function AbortPath Lib "gdi32" (hdc As HDC) As BOOL
[160]557Type BLENDFUNCTION
558 BlendOp As Byte
559 BlendFlags As Byte
560 SourceConstantAlpha As Byte
561 AlphaFormat As Byte
562End Type
563Declare Function AlphaBlend Lib "msimg32" (hdcDest As HDC, nXDest As Long, nYDest As Long, nDestWidth As Long, nDestHeight As Long, hdcSrc As HDC, XSrc As Long, YSrc As Long, nSrcWidth As Long, nSrcHeight As Long, ByRef blendfunc As BLENDFUNCTION) As Long
[1]564Declare Function Arc Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nXStartArc As Long, nYStartArc As Long, nXEndArc As Long, nYEndArc As Long) As BOOL
565Declare Function BeginPath Lib "gdi32" (hdc As HDC) As BOOL
566Declare Function BitBlt Lib "gdi32" (hdcDest As HDC, nXDest As Long, nYDest As Long, nWidth As Long, nHeight As Long, hdcSrc As HDC, nXSrc As Long, nYSrc As Long, dwRop As DWord) As BOOL
567Declare Function CancelDC Lib "gdi32" (hdc As HDC) As BOOL
568Declare Function Chord Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nXRadial1 As Long, nYRadial1 As Long, nXRadial2 As Long, nYRadial2 As Long) As BOOL
[123]569Declare Function CloseEnhMetaFile Lib "gdi32" (hdc As HDC) As HENHMETAFILE
[1]570Declare Function CloseFigure Lib "gdi32" (hdc As HDC) As BOOL
[123]571Declare Function CloseMetaFile Lib "gdi32" (hdc As HDC) As HMETAFILE
[1]572
573Const RGN_AND = 1
574Const RGN_OR = 2
575Const RGN_XOR = 3
576Const RGN_DIFF = 4
577Const RGN_COPY = 5
578Declare Function CombineRgn Lib "gdi32" (hrgnDest As HRGN, hrgnSrc1 As HRGN, hrgnSrc2 As HRGN, fnCombineMode As Long) As Long
[141]579Declare Function CopyEnhMetaFile Lib "gdi32" Alias _FuncName_CopyEnhMetaFile (hemfSrc As HENHMETAFILE, pszFile As PCTSTR) As HENHMETAFILE
580Declare Function CopyMetaFile Lib "gdi32" Alias _FuncName_CopyMetaFile (hmfSrc As HMETAFILE, pszFile As PCTSTR) As HMETAFILE
[1]581Declare Function CreateBitmap Lib "gdi32" (nWidth As Long, nHeight As Long, cPlanes As Long, cBitsPerPel As Long, lpvBits As VoidPtr) As HBITMAP
[141]582Declare Function CreateBitmapIndirect Lib "gdi32" (ByRef bm As BITMAP) As HBITMAP
[1]583
584Const BS_SOLID = 0
585Const BS_NULL = 1
586Const BS_HOLLOW = BS_NULL
587Const BS_HATCHED = 2
588Const BS_PATTERN = 3
589Const BS_INDEXED = 4
590Const BS_DIBPATTERN = 5
591Const BS_DIBPATTERNPT = 6
592Const BS_PATTERN8X8 = 7
593Const BS_DIBPATTERN8X8 = 8
594Const BS_MONOPATTERN = 9
595Const DIB_RGB_COLORS = 0
596Const DIB_PAL_COLORS = 1
597Const HS_HORIZONTAL = 0
598Const HS_VERTICAL = 1
599Const HS_FDIAGONAL = 2
600Const HS_BDIAGONAL = 3
601Const HS_CROSS = 4
602Const HS_DIAGCROSS = 5
603Type LOGBRUSH
604 lbStyle As Long
605 lbColor As Long
606 lbHatch As Long
607End Type
608Declare Function CreateBrushIndirect Lib "gdi32" (ByRef lplb As LOGBRUSH) As HBRUSH
609
610Declare Function CreateCompatibleBitmap Lib "gdi32" (hdc As HDC, nWidth As Long, nHeight As Long) As HBITMAP
611Declare Function CreateCompatibleDC Lib "gdi32" (hdc As HDC) As HDC
[141]612Declare Function CreateDC Lib "gdi32" Alias _FuncName_CreateDC (pszDriver As PCTSTR, pszDevice As PCTSTR, pszOutput As PCTSTR, ByRef InitData As DEVMODE) As HDC
[1]613
614Const CBM_INIT = &H04
[141]615Declare Function CreateDIBitmap Lib "gdi32" (hdc As HDC, ByRef bmih As BITMAPINFOHEADER, fdwInit As Long, lpbInit As VoidPtr, ByRef bmi As BITMAPINFO, fuUsage As Long) As HBITMAP
[1]616
617Declare Function CreateDIBPatternBrushPt Lib "gdi32" (lpPackedDIB As VoidPtr, iUsage As Long) As HBRUSH
618Declare Function CreateDIBSection Lib "gdi32" (hdc As HDC, ByRef BmpInfo As BITMAPINFO, iUsage As DWord, ppvBits As *VoidPtr, hSection As HANDLE, dwOffset As DWord) As HBITMAP
619Declare Function CreateEllipticRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
620Declare Function CreateEllipticRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN
[141]621Declare Function CreateEnhMetaFile Lib "gdi32" Alias _FuncName_CreateEnhMetaFile (hdcRef As HDC, pFileName As PCTSTR, ByRef Rect As RECT, pDescription As PCTSTR) As HDC
622Declare Function CreateMetaFile Lib "gdi32" Alias _FuncName_CreateMetaFile (pFileName As PCTSTR) As HDC
[1]623
624Const FW_DONTCARE = 0
625Const FW_THIN = 100
626Const FW_EXTRALIGHT = 200
627Const FW_LIGHT = 300
628Const FW_NORMAL = 400
629Const FW_MEDIUM = 500
630Const FW_SEMIBOLD = 600
631Const FW_BOLD = 700
632Const FW_EXTRABOLD = 800
633Const FW_HEAVY = 900
634Const FW_ULTRALIGHT = FW_EXTRALIGHT
635Const FW_REGULAR = FW_NORMAL
636Const FW_DEMIBOLD = FW_SEMIBOLD
637Const FW_ULTRABOLD = FW_EXTRABOLD
638Const FW_BLACK = FW_HEAVY
639
640Const ANSI_CHARSET = 0
641Const DEFAULT_CHARSET = 1
642Const SYMBOL_CHARSET = 2
643Const SHIFTJIS_CHARSET = 128
644Const HANGEUL_CHARSET = 129
645Const HANGUL_CHARSET = 129
646Const GB2312_CHARSET = 134
647Const CHINESEBIG5_CHARSET = 136
648Const OEM_CHARSET = 255
649Const JOHAB_CHARSET = 130
650Const HEBREW_CHARSET = 177
651Const ARABIC_CHARSET = 178
652Const GREEK_CHARSET = 161
653Const TURKISH_CHARSET = 162
654Const VIETNAMESE_CHARSET = 163
655Const THAI_CHARSET = 222
656Const EASTEUROPE_CHARSET = 238
657Const RUSSIAN_CHARSET = 204
658Const MAC_CHARSET = 77
659Const BALTIC_CHARSET = 186
660
661Const OUT_DEFAULT_PRECIS = 0
662Const OUT_STRING_PRECIS = 1
663Const OUT_CHARACTER_PRECIS = 2
664Const OUT_STROKE_PRECIS = 3
665Const OUT_TT_PRECIS = 4
666Const OUT_DEVICE_PRECIS = 5
667Const OUT_RASTER_PRECIS = 6
668Const OUT_TT_ONLY_PRECIS = 7
669Const OUT_OUTLINE_PRECIS = 8
670Const OUT_SCREEN_OUTLINE_PRECIS = 9
671
672Const CLIP_DEFAULT_PRECIS = 0
673Const CLIP_CHARACTER_PRECIS = 1
674Const CLIP_STROKE_PRECIS = 2
675Const CLIP_MASK = &Hf
676Const CLIP_LH_ANGLES = &H00010000
677Const CLIP_TT_ALWAYS = &H00020000
678Const CLIP_EMBEDDED = &H00080000
679
680Const DEFAULT_QUALITY = 0
681Const DRAFT_QUALITY = 1
682Const PROOF_QUALITY = 2
683Const NONANTIALIASED_QUALITY =3
684Const ANTIALIASED_QUALITY = 4
685
686Const DEFAULT_PITCH = 0
687Const FIXED_PITCH = 1
688Const VARIABLE_PITCH = 2
689
690Const FF_DONTCARE = 0
691Const FF_ROMAN = &H00010000
692Const FF_SWISS = &H00020000
693Const FF_MODERN = &H00030000
694Const FF_SCRIPT = &H00040000
695Const FF_DECORATIVE = &H00050000
[141]696Declare Function CreateFont Lib "gdi32" Alias _FuncName_CreateFont (nHeight As Long, nWidth As Long, nEscapement As Long, nOrientation As Long, fnWeight As Long, fdwItalic As DWord, fdwUnderline As DWord, fdwStrikeOut As DWord, fdwCharSet As DWord, fdwOutputPrecision As DWord, fdwClipPrecision As DWord, fdwQuality As DWord, fdwPitchAndFamily As DWord, lpszFace As PCTSTR) As HFONT
[1]697
698Const LF_FACESIZE = 32
699Type LOGFONTA
700 lfHeight As Long
701 lfWidth As Long
702 lfEscapement As Long
703 lfOrientation As Long
704 lfWeight As Long
705 lfItalic As Byte
706 lfUnderline As Byte
707 lfStrikeOut As Byte
708 lfCharSet As Byte
709 lfOutPrecision As Byte
710 lfClipPrecision As Byte
711 lfQuality As Byte
712 lfPitchAndFamily As Byte
[141]713 lfFaceName[ELM(LF_FACESIZE)] As SByte
[1]714End Type
715Type LOGFONTW
716 lfHeight As Long
717 lfWidth As Long
718 lfEscapement As Long
719 lfOrientation As Long
720 lfWeight As Long
721 lfItalic As Byte
722 lfUnderline As Byte
723 lfStrikeOut As Byte
724 lfCharSet As Byte
725 lfOutPrecision As Byte
726 lfClipPrecision As Byte
727 lfQuality As Byte
728 lfPitchAndFamily As Byte
729 lfFaceName[ELM(LF_FACESIZE)] As WCHAR
730End Type
[119]731#ifdef UNICODE
732TypeDef LOGFONT = LOGFONTW
733#else
[1]734TypeDef LOGFONT = LOGFONTA
[119]735#endif
[125]736Declare Function CreateFontIndirectA Lib "gdi32" (ByRef lf As LOGFONTA) As HFONT
[137]737Declare Function CreateFontIndirect Lib "gdi32" Alias _FuncName_CreateFontIndirect (ByRef lf As LOGFONT) As HFONT
[1]738
739Declare Function CreateHatchBrush Lib "gdi32" (fnStyle As Long, clrref As COLORREF) As HBRUSH
740Declare Function CreatePatternBrush Lib "gdi32" (hbmp As HBITMAP) As HBRUSH
741
742Const PS_SOLID = 0
743Const PS_DASH = 1
744Const PS_DOT = 2
745Const PS_DASHDOT = 3
746Const PS_DASHDOTDOT = 4
747Const PS_NULL = 5
748Const PS_INSIDEFRAME = 6
749Const PS_USERSTYLE = 7
750Const PS_ALTERNATE = 8
751Declare Function CreatePen Lib "gdi32" (nPenStyle As Long, nWidth As Long, crColor As COLORREF) As HPEN
752
753Type LOGPEN
754 lopnStyle As DWord
755 lopnWidth As POINTAPI
756 lopnColor As COLORREF
757End Type
758Declare Function CreatePenIndirect Lib "gdi32" (ByRef lplgpn As LOGPEN) As HPEN
759
760Declare Function CreatePolygonRgn Lib "gdi32" (ByRef lpPoints As POINTAPI, cPoints As Long, fnPolyFillMode As Long) As HRGN
761Declare Function CreateRectRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As HRGN
762Declare Function CreateRectRgnIndirect Lib "gdi32" (ByRef lpRect As RECT) As HRGN
763Declare Function CreateRoundRectRgn Lib "gdi32" (nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nWidthEllipse As Long, nHeightEllipse As Long) As HRGN
764Declare Function CreateSolidBrush Lib "gdi32" (crColor As COLORREF) As HBRUSH
765Declare Function DeleteDC Lib "gdi32" (hdc As HDC) As BOOL
[123]766Declare Function DeleteEnhMetaFile Lib "gdi32" (hemf As HENHMETAFILE) As BOOL
767Declare Function DeleteMetaFile Lib "gdi32" (hmf As HMETAFILE) As BOOL
[1]768Declare Function DeleteObject Lib "gdi32" (hObject As HANDLE) As BOOL
769Declare Function DPtoLP Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, nCount As Long) As BOOL
770Declare Function Ellipse Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, RightRect As Long, nBottomRect As Long) As BOOL
771Declare Function EndDoc Lib "gdi32" (hdc As HDC) As Long
772Declare Function EndPage Lib "gdi32" (hdc As HDC) As Long
773Declare Function EndPath Lib "gdi32" (hdc As HDC) As BOOL
[123]774Declare Function EnumEnhMetaFile Lib "gdi32" (hdc As HDC, hemf As HENHMETAFILE, pEnhMetaFunc As ENHMFENUMPROC, pData As VoidPtr, ByRef Rect As RECT) As BOOL
775Declare Function EnumMetaFile Lib "gdi32" (hdc As HDC, hmf As HMETAFILE, pMetaFunc As MFENUMPROC, lParam As LPARAM) As BOOL
[1]776Declare Function EqualRgn Lib "gdi32" (hSrcRgn1 As HRGN, hSrcRgn2 As HRGN) As BOOL
777Declare Function ExcludeClipRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
778
779Const FLOODFILLBORDER = 0
780Const FLOODFILLSURFACE = 1
781Declare Function ExtFloodFill Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, crColor As COLORREF, fuFillType As DWord) As BOOL
782
783Const PS_COSMETIC = &H00000000
784Const PS_GEOMETRIC = &H00010000
785Const PS_ENDCAP_ROUND = &H00000000
786Const PS_ENDCAP_SQUARE = &H00000100
787Const PS_ENDCAP_FLAT = &H00000200
788Const PS_JOIN_ROUND = &H00000000
789Const PS_JOIN_BEVEL = &H00001000
790Const PS_JOIN_MITER = &H00002000
791Declare Function ExtCreatePen Lib "gdi32" (dwPenStyle As DWord, dwWidth As DWord, ByRef lplb As LOGBRUSH, dwStyleCount As DWord, lpStyle As *DWord) As HPEN
792
793Declare Function ExtSelectClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, fnMode As Long) As Long
[121]794Declare Function ExtTextOutA Lib "gdi32" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCSTR, cbCount As Long, pDx As *Long) As Long
795Declare Function ExtTextOutW Lib "gdi32" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, lpString As PCWSTR, cbCount As Long, pDx As *Long) As Long
796#ifdef UNICODE
[141]797Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutW" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCWSTR, cbCount As Long, pDx As *Long) As Long
[121]798#else
[141]799Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (hdc As HDC, x As Long, y As Long, fuOptions As DWord, ByRef rc As RECT, pString As PCSTR, cbCount As Long, pDx As *Long) As Long
[121]800#endif
[1]801Declare Function FillPath Lib "gdi32" (hdc As HDC) As Long
802Declare Function FillRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, hBrush As HBRUSH) As Long
803Declare Function FrameRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN, hBrush As HBRUSH, nWidth As Long, nHeight As Long) As Long
[123]804Declare Function GdiComment Lib "gdi32" (hdc As HDC, cbSize As DWord, lpData As *Byte) As BOOL
805Declare Function GetBitmapBits Lib "gdi32" (hbmp As HBITMAP, cbBuffer As Long, lpvBits As VoidPtr) As Long
[1]806Declare Function GetBkColor Lib "gdi32" (hdc As HDC) As DWord
807Declare Function GetBkMode Lib "gdi32" (hdc As HDC) As Long
808Declare Function GetBrushOrgEx Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI) As Long
[141]809' only WinNT
810'Declare Function GetCharWidth32 Lib "gdi32" Alias "GetCharWidth32A" (hdc As HDC, iFirstChar As DWord, iLastChar As DWord, pBuffer As *DWord) As Long
[1]811Declare Function GetClipBox Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
812Declare Function GetClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
813Declare Function GetCurrentObject Lib "gdi32" (hdc As HDC, dwObjectType As DWord) As HANDLE
[141]814Declare Function GetCurrentPositionEx Lib "gdi32" (hdc As HDC, ByRef Point As POINTAPI) As Long
[1]815
816Const DRIVERVERSION = 0
817Const TECHNOLOGY = 2
818Const HORZSIZE = 4
819Const VERTSIZE = 6
820Const HORZRES = 8
821Const VERTRES = 10
822Const BITSPIXEL = 12
823Const PLANES = 14
824Const NUMBRUSHES = 16
825Const NUMPENS = 18
826Const NUMMARKERS = 20
827Const NUMFONTS = 22
828Const NUMCOLORS = 24
829Const PDEVICESIZE = 26
830Const CURVECAPS = 28
831Const LINECAPS = 30
832Const POLYGONALCAPS = 32
833Const TEXTCAPS = 34
834Const CLIPCAPS = 36
835Const RASTERCAPS = 38
836Const ASPECTX = 40
837Const ASPECTY = 42
838Const ASPECTXY = 44
839Const SHADEBLENDCAPS = 45
840Const LOGPIXELSX = 88
841Const LOGPIXELSY = 90
842Const SIZEPALETTE = 104
843Const NUMRESERVED = 106
844Const COLORRES = 108
845Const PHYSICALWIDTH = 110
846Const PHYSICALHEIGHT = 111
847Const PHYSICALOFFSETX = 112
848Const PHYSICALOFFSETY = 113
849Const SCALINGFACTORX = 114
850Const SCALINGFACTORY = 115
851Const VREFRESH = 116
852Const DESKTOPVERTRES = 117
853Const DESKTOPHORZRES = 118
854Const BLTALIGNMENT = 119
855Const DT_PLOTTER = 0 ' Device Technologies
856Const DT_RASDISPLAY = 1
857Const DT_RASPRINTER = 2
858Const DT_RASCAMERA = 3
859Const DT_CHARSTREAM = 4
860Const DT_METAFILE = 5
861Const DT_DISPFILE = 6
862Const CC_NONE = 0 ' Curve Capabilities
863Const CC_CIRCLES = 1
864Const CC_PIE = 2
865Const CC_CHORD = 4
866Const CC_ELLIPSES = 8
867Const CC_WIDE = 16
868Const CC_STYLED = 32
869Const CC_WIDESTYLED = 64
870Const CC_INTERIORS = 128
871Const CC_ROUNDRECT = 256
872Const LC_NONE = 0 ' Line Capabilities
873Const LC_POLYLINE = 2
874Const LC_MARKER = 4
875Const LC_POLYMARKER = 8
876Const LC_WIDE = 16
877Const LC_STYLED = 32
878Const LC_WIDESTYLED = 64
879Const LC_INTERIORS = 128
880Const PC_NONE = 0 ' Polygonal Capabilities
881Const PC_POLYGON = 1
882Const PC_RECTANGLE = 2
883Const PC_WINDPOLYGON = 4
884Const PC_TRAPEZOID = 4
885Const PC_SCANLINE = 8
886Const PC_WIDE = 16
887Const PC_STYLED = 32
888Const PC_WIDESTYLED = 64
889Const PC_INTERIORS = 128
890Const PC_POLYPOLYGON = 256
891Const PC_PATHS = 512
892Const CP_NONE = 0 ' Clipping Capabilities
893Const CP_RECTANGLE = 1
894Const CP_REGION = 2
895Const TC_OP_CHARACTER = &H00000001 ' Text Capabilities
896Const TC_OP_STROKE = &H00000002
897Const TC_CP_STROKE = &H00000004
898Const TC_CR_90 = &H00000008
899Const TC_CR_ANY = &H00000010
900Const TC_SF_X_YINDEP = &H00000020
901Const TC_SA_DOUBLE = &H00000040
902Const TC_SA_INTEGER = &H00000080
903Const TC_SA_CONTIN = &H00000100
904Const TC_EA_DOUBLE = &H00000200
905Const TC_IA_ABLE = &H00000400
906Const TC_UA_ABLE = &H00000800
907Const TC_SO_ABLE = &H00001000
908Const TC_RA_ABLE = &H00002000
909Const TC_VA_ABLE = &H00004000
910Const TC_RESERVED = &H00008000
911Const TC_SCROLLBLT = &H00010000
912Const RC_BITBLT = 1 ' Raster Capabilities
913Const RC_BANDING = 2
914Const RC_SCALING = 4
915Const RC_BITMAP64 = 8
916Const RC_GDI20_OUTPUT = &H0010
917Const RC_GDI20_STATE = &H0020
918Const RC_SAVEBITMAP = &H0040
919Const RC_DI_BITMAP = &H0080
920Const RC_PALETTE = &H0100
921Const RC_DIBTODEV = &H0200
922Const RC_BIGFONT = &H0400
923Const RC_STRETCHBLT = &H0800
924Const RC_FLOODFILL = &H1000
925Const RC_STRETCHDIB = &H2000
926Const RC_OP_DX_OUTPUT = &H4000
927Const RC_DEVBITS = &H8000
928Const SB_NONE = &H00000000 ' Shading and blending caps
929Const SB_CONST_ALPHA = &H00000001
930Const SB_PIXEL_ALPHA = &H00000002
931Const SB_PREMULT_ALPHA = &H00000004
932Const SB_GRAD_RECT = &H00000010
933Declare Function GetDeviceCaps Lib "gdi32" (hdc As HDC, nIndex As Long) As Long
934
935Declare Function GetDIBits Lib "gdi32" (hdc As HDC, hbmp As HBITMAP, uStartScan As DWord, cScanLines As DWord, lpvBits As VoidPtr, ByRef lpbi As BITMAPINFO, uUsage As DWord) As Long
[141]936Declare Function GetEnhMetaFile Lib "gdi32" Alias _FuncName_GetEnhMetaFile (pszMetaFile As PCTSTR) As HENHMETAFILE
[123]937Declare Function GetEnhMetaFileBits Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, pbBuffer As *Byte) As DWord
[141]938Declare Function GetEnhMetaFileDescription Lib "gdi32" Alias _FuncName_GetEnhMetaFileDescription (hemf As HENHMETAFILE, cbBuffer As DWord, pszDescription As PTSTR) As DWord
[123]939Declare Function GetEnhMetaFileHeader Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, ByRef emh As ENHMETAHEADER) As DWord
940Declare Function GetEnhMetaFilePaletteEntries Lib "gdi32" (hemf As HENHMETAFILE, cEntries As DWord, ByRef pe As PALETTEENTRY) As DWord
[1]941
942Const MM_TEXT = 1
943Const MM_LOMETRIC = 2
944Const MM_HIMETRIC = 3
945Const MM_LOENGLISH = 4
946Const MM_HIENGLISH = 5
947Const MM_TWIPS = 6
948Const MM_ISOTROPIC = 7
949Const MM_ANISOTROPIC = 8
950Declare Function GetMapMode Lib "gdi32" (hdc As HDC) As Long
[123]951Declare Function GetMetaFileBitsEx Lib "gdi32" (hmf As HMETAFILE, nSize As DWord, pvData As VoidPtr) As DWord
[1]952Declare Function GetMiterLimit Lib "gdi32" (hdc As HDC, peLimit As SinglePtr) As Long
[141]953Declare Function GetObject Lib "gdi32" Alias _FuncName_GetObject (hgdiobj As HANDLE, cbBuffer As Long, ByRef pvObject As Any) As Long
[1]954Declare Function GetObjectType Lib "gdi32" (hObject As HANDLE) As Long
955
956Const PT_CLOSEFIGURE = &H01
957Const PT_LINETO = &H02
958Const PT_BEZIERTO = &H04
959Const PT_MOVETO = &H06
960Declare Function GetPath Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, lpTypes As BytePtr, nSize As Long) As Long
961
962Declare Function GetPixel Lib "gdi32" (hdc As HDC, x As Long, y As Long) As DWord
963Declare Function GetPolyFillMode Lib "gdi32" (hdc As HDC) As Long
964Declare Function GetRgnBox Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
965Declare Function GetROP2 Lib "gdi32" (hdc As HDC) As Long
966
967Const WHITE_BRUSH = 0
968Const LTGRAY_BRUSH = 1
969Const GRAY_BRUSH = 2
970Const DKGRAY_BRUSH = 3
971Const BLACK_BRUSH = 4
972Const NULL_BRUSH = 5
973Const HOLLOW_BRUSH = NULL_BRUSH
974Const WHITE_PEN = 6
975Const BLACK_PEN = 7
976Const NULL_PEN = 8
977Const OEM_FIXED_FONT = 10
978Const ANSI_FIXED_FONT = 11
979Const ANSI_VAR_FONT = 12
980Const SYSTEM_FONT = 13
981Const DEVICE_DEFAULT_FONT = 14
982Const DEFAULT_PALETTE = 15
983Const SYSTEM_FIXED_FONT = 16
984Declare Function GetStockObject Lib "gdi32" (fnObject As Long) As HANDLE
985
986Declare Function GetStretchBltMode Lib "gdi32" (hdc As HDC) As Long
987
988Const TA_NOUPDATECP = 0
989Const TA_UPDATECP = 1
990Const TA_LEFT = 0
991Const TA_RIGHT = 2
992Const TA_CENTER = 6
993Const TA_TOP = 0
994Const TA_BOTTOM = 8
995Const TA_BASELINE = 24
996Const TA_RTLREADING = 256
997Declare Function GetTextAlign Lib "gdi32" (hdc As HDC) As DWord
998
999Declare Function GetTextColor Lib "gdi32" (hdc As HDC) As DWord
[119]1000Declare Function GetTextExtentPoint32A Lib "gdi32" (hdc As HDC, pString As PCSTR, cbString As Long, ByRef Size As SIZE) As Long
1001Declare Function GetTextExtentPoint32W Lib "gdi32" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
1002#ifdef UNICODE
[141]1003Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32W" (hdc As HDC, pString As PCWSTR, cbString As Long, ByRef Size As SIZE) As Long
[119]1004#else
[141]1005Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (hdc As HDC, pString As PCSTR, cbString As Long, ByRef Size As SIZE) As Long
[119]1006#endif
[160]1007Declare Function GetTextFace Lib "gdi32" Alias _FuncName_GetTextFace (hdc As HDC, nCount As Long, lpFacename As LPTSTR)As Long
[1]1008
1009Const TMPF_FIXED_PITCH = &H01
1010Const TMPF_VECTOR = &H02
1011Const TMPF_DEVICE = &H08
1012Const TMPF_TRUETYPE = &H04
[141]1013Type TEXTMETRICW
[1]1014 tmHeight As Long
1015 tmAscent As Long
1016 tmDescent As Long
1017 tmInternalLeading As Long
1018 tmExternalLeading As Long
1019 tmAveCharWidth As Long
1020 tmMaxCharWidth As Long
1021 tmWeight As Long
1022 tmOverhang As Long
1023 tmDigitizedAspectX As Long
1024 tmDigitizedAspectY As Long
[141]1025 tmFirstChar As WCHAR
1026 tmLastChar As WCHAR
1027 tmDefaultChar As WCHAR
1028 tmBreakChar As WCHAR
[1]1029 tmItalic As Byte
1030 tmUnderlined As Byte
1031 tmStruckOut As Byte
1032 tmPitchAndFamily As Byte
1033 tmCharSet As Byte
1034End Type
[141]1035Type TEXTMETRICA
1036 tmHeight As Long
1037 tmAscent As Long
1038 tmDescent As Long
1039 tmInternalLeading As Long
1040 tmExternalLeading As Long
1041 tmAveCharWidth As Long
1042 tmMaxCharWidth As Long
1043 tmWeight As Long
1044 tmOverhang As Long
1045 tmDigitizedAspectX As Long
1046 tmDigitizedAspectY As Long
1047 tmFirstChar As SByte
1048 tmLastChar As SByte
1049 tmDefaultChar As SByte
1050 tmBreakChar As SByte
1051 tmItalic As Byte
1052 tmUnderlined As Byte
1053 tmStruckOut As Byte
1054 tmPitchAndFamily As Byte
1055 tmCharSet As Byte
1056End Type
1057#ifdef UNICODE
1058TypeDef TEXTMETRIC = TEXTMETRICW
1059#else
1060TypeDef TEXTMETRIC = TEXTMETRICA
1061#endif
1062Declare Function GetTextMetrics Lib "gdi32" Alias _FuncName_GetTextMetrics (hdc As HDC, ByRef tm As TEXTMETRIC) As Long
[1]1063
1064Declare Function GetViewportExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
1065Declare Function GetViewportOrgEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
1066Declare Function GetWindowExtEx Lib "gdi32" (hdc As HDC, ByRef lpSize As SIZE) As Long
1067Declare Function GetWindowOrgEx Lib "gdi32" (hdc As HDC, ByRef lpPoint As POINTAPI) As Long
[123]1068Declare Function GetWinMetaFileBits Lib "gdi32" (hemf As HENHMETAFILE, cbBuffer As DWord, pbBuffer As *Byte, fnMapMode As Long, hdcRef As HDC) As DWord
[1]1069Declare Function IntersectClipRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
1070Declare Function InvertRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
1071Declare Function LineTo Lib "gdi32" (hdc As HDC, nXEnd As Long, nYEnd As Long) As Long
1072Declare Function LPtoDP Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, nCount As Long) As Long
1073Declare Function MoveToEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
1074Declare Function OffsetRgn Lib "gdi32" (hRgn As HRGN, nXOffset As Long, nYOffset As Long) As Long
1075Declare Function OffsetClipRgn Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long) As Long
1076Declare Function OffsetViewportOrgEx Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long, ByRef lpPoint As POINTAPI) As Long
1077Declare Function OffsetWindowOrgEx Lib "gdi32" (hdc As HDC, nXOffset As Long, nYOffset As Long, ByRef lpPoint As POINTAPI) As Long
1078Declare Function PaintRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
1079Declare Function PatBlt Lib "gdi32" (hdc As HDC, nXLeft As Long, nYLeft As Long, nWidth As Long, nHeight As Long, dwRop As DWord) As Long
1080Declare Function PathToRegion Lib "gdi32" (hdc As HDC) As HRGN
1081Declare Function Pie Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nXRadial1 As Long, nYRadial1 As Long, nXRadial2 As Long, nYRadial2 As Long) As Long
[123]1082Declare Function PlayEnhMetaFile Lib "gdi32" (hdc As HDC, hemf As HENHMETAFILE, ByRef Rect As RECT) As Long
1083Declare Function PlayEnhMetaFileRecord Lib "gdi32" (hdc As HDC, ByRef Handletable As HANDLETABLE, ByRef EnhMetaRecord As ENHMETARECORD, nHandles As DWord) As BOOL
1084Declare Function PlayMetaFile Lib "gdi32" (hdc As HDC, hmf As HMETAFILE) As BOOL
1085Declare Function PlayMetaFileRecord Lib "gdi32" (hdc As HDC, ByRef Handletable As HANDLETABLE, ByRef MetaRecord As METARECORD, nHandles As DWord) As BOOL
[1]1086Declare Function PlgBlt Lib "gdi32" (hdcDest As HDC, ByRef lpPoint As POINTAPI, hdcSrc As HDC, nXSrc As Long, nYSrc As Long, nWidth As Long, nHeight As Long, hbmMask As HBITMAP, xMask As Long, yMask As Long) As Long
1087Declare Function PolyBezier Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
1088Declare Function PolyBezierTo Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
1089Declare Function Polygon Lib "gdi32" (hdc As HDC, ByRef lpPoints As POINTAPI, cPoints As Long) As Long
1090Declare Function Polyline Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
1091Declare Function PolylineTo Lib "gdi32" (hdc As HDC, ByRef lppt As POINTAPI, cPoints As Long) As Long
1092Declare Function PtInRegion Lib "gdi32" (hRgn As HRGN, x As Long, y As Long) As Long
1093Declare Function PtVisible Lib "gdi32" (hdc As HDC, x As Long, y As Long) As Long
1094Declare Function RealizePalette Lib "gdi32" (hdc As HDC) As Long
1095Declare Function Rectangle Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
1096Declare Function RectInRegion Lib "gdi32" (hRgn As HRGN, ByRef lpRect As RECT) As Long
1097Declare Function RectVisible Lib "gdi32" (hdc As HDC, ByRef lpRect As RECT) As Long
[141]1098Declare Function ResetDC Lib "gdi32" Alias _FuncName_ResetDC (hdc As HDC, ByRef InitData As DEVMODE) As HDC
[1]1099Declare Function RestoreDC Lib "gdi32" (hdc As HDC, nSavedDC As Long) As Long
1100Declare Function RoundRect Lib "gdi32" (hdc As HDC, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long, nWidth As Long, nHeight As Long) As Long
1101Declare Function SaveDC Lib "gdi32" (hdc As HDC) As Long
1102Declare Function ScaleViewportExtEx Lib "gdi32" (hdc As HDC, Xnum As Long, Xdenom As Long, Ynum As Long, Ydenom As Long, ByRef lpSize As SIZE) As Long
1103Declare Function ScaleWindowExtEx Lib "gdi32" (hdc As HDC, Xnum As Long, Xdenom As Long, Ynum As Long, Ydenom As Long, ByRef lpSize As SIZE) As Long
1104Declare Function SelectClipPath Lib "gdi32" (hdc As HDC, iMode As Long) As Long
1105Declare Function SelectClipRgn Lib "gdi32" (hdc As HDC, hRgn As HRGN) As Long
1106Declare Function SelectObject Lib "gdi32" (hdc As HDC, hObject As HANDLE) As HANDLE
1107Declare Function SelectPalette Lib "gdi32" (hdc As HDC, hpal As HPALETTE, bForceBackground As BOOL) As HPALETTE
1108Declare Function SetBkColor Lib "gdi32" (hdc As HDC, crColor As DWord) As DWord
1109
1110Const TRANSPARENT = 1
1111Const OPAQUE = 2
1112Declare Function SetBkMode Lib "gdi32" (hdc As HDC, iBkMode As Long) As Long
1113
1114Declare Function SetBrushOrgEx Lib "gdi32" (hdc As HDC, nXOrg As Long, nYOrg As Long, ByRef lppt As POINTAPI) As Long
1115Declare Function SetDIBits Lib "gdi32" (hdc As HDC, hbmp As HBITMAP, uStartScan As DWord, cScanLines As DWord, lpvBits As VoidPtr, ByRef lpbmi As BITMAPINFO, fuColorUse As DWord) As Long
[123]1116Declare Function SetEnhMetaFileBits Lib "gdi32" (cbBuffer As DWord, pData As *Byte) As HENHMETAFILE
[1]1117Declare Function SetMapMode Lib "gdi32" (hdc As HDC, fnMapMode As Long) As Long
[123]1118Declare Function SetMetaFileBitsEx Lib "gdi32" (nSize As DWord, pData As *Byte) As HMETAFILE
[1]1119Declare Function SetMiterLimit Lib "gdi32" (hdc As HDC, eNewLimit As Single, peOldLimit As SinglePtr) As Long
1120Declare Function SetPixel Lib "gdi32" (hdc As HDC, x As Long, y As Long, crColor As DWord) As DWord
1121Declare Function SetPolyFillMode Lib "gdi32" (hdc As HDC, iPolyFillMode As Long) As Long
1122Declare Function SetRectRgn Lib "gdi32" (hRgn As HRGN, nLeftRect As Long, nTopRect As Long, nRightRect As Long, nBottomRect As Long) As Long
1123Declare Function SetROP2 Lib "gdi32" (hdc As HDC, fnDrawMode As Long) As Long
1124
1125Const BLACKONWHITE = 1
1126Const WHITEONBLACK = 2
1127Const COLORONCOLOR = 3
1128Const HALFTONE = 4
1129Const STRETCH_ANDSCANS = BLACKONWHITE
1130Const STRETCH_ORSCANS = WHITEONBLACK
1131Const STRETCH_DELETESCANS = COLORONCOLOR
1132Const STRETCH_HALFTONE = HALFTONE
1133Declare Function SetStretchBltMode Lib "gdi32" (hdc As HDC, iStretchMode As Long) As Long
1134
1135Declare Function SetTextAlign Lib "gdi32" (hdc As HDC, fMode As DWord) As DWord
1136Declare Function SetTextColor Lib "gdi32" (hdc As HDC, crColor As DWord) As DWord
1137Declare Function SetViewportExtEx Lib "gdi32" (hdc As HDC, nXExtent As Long, nYExtent As Long, ByRef lpSize As SIZE) As Long
1138Declare Function SetViewportOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
1139Declare Function SetWindowExtEx Lib "gdi32" (hdc As HDC, nXExtent As Long, nYExtent As Long, ByRef lpSize As SIZE) As Long
1140Declare Function SetWindowOrgEx Lib "gdi32" (hdc As HDC, x As Long, y As Long, ByRef lpPoint As POINTAPI) As Long
[123]1141Declare Function SetWinMetaFileBits Lib "gdi32" (cbBuffer As DWord, pbBuffer As *Byte, hdcRef As HDC, ByRef mfp As METAFILEPICT) As HENHMETAFILE
[141]1142Declare Function StartDoc Lib "gdi32" Alias _FuncName_StartDoc (hdc As HDC, ByRef di As DOCINFO) As Long
[1]1143Declare Function StartPage Lib "gdi32" (hdc As HDC) As Long
1144Declare Function StretchBlt Lib "gdi32" (hdcDest As HDC, nXOriginDest As Long, nYOriginDest As Long, nWidthDest As Long, nHeightDest As Long, hdcSrc As HDC, nXOriginSrc As Long, nYOriginSrc As Long, nWidthSrc As Long, nHeightSrc As Long, dwRop As DWord) As Long
1145Declare Function StretchDIBits Lib "gdi32" (hdc As HDC, XDest As Long, YDest As Long, nDestWidth As Long, nDestHeight As Long, XSrc As Long, YSrc As Long, nSrcWidth As Long, nSrcHeight As Long, lpBits As VoidPtr, ByRef lpBitsInfo As BITMAPINFO, iUsage As Long, dwRop As DWord) As Long
1146Declare Function StrokeAndFillPath Lib "gdi32" (hdc As HDC) As Long
1147Declare Function StrokePath Lib "gdi32" (DC As DWord) As Long
[119]1148Declare Function TextOutA Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCSTR, cbString As Long) As Long
1149Declare Function TextOutW Lib "gdi32" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
1150#ifdef UNICODE
[141]1151Declare Function TextOut Lib "gdi32" Alias "TextOutW" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCWSTR, cbString As Long) As Long
[119]1152#else
[141]1153Declare Function TextOut Lib "gdi32" Alias "TextOutA" (hdc As HDC, nXStart As Long, nYStart As Long, pString As PCSTR, cbString As Long) As Long
[119]1154#endif
[160]1155 Declare Function TransparentBlt Lib "msimg32" (hdcDest As HDC, nXDest As Long, nYDest As Long, nDestWidth As Long, nDestHeight As Long, hdcSrc As HDC, XSrc As Long, YSrc As Long, nSrcWidth As Long, nSrcHeight As Long, dwRop As DWord) As Long
[1]1156
1157/* Pixel Format */
1158Type PIXELFORMATDESCRIPTOR
1159 nSize As Word
1160 nVersion As Word
1161 dwFlags As DWord
1162 iPixelType As Byte
1163 cColorBits As Byte
1164 cRedBits As Byte
1165 cRedShift As Byte
1166 cGreenBits As Byte
1167 cGreenShift As Byte
1168 cBlueBits As Byte
1169 cBlueShift As Byte
1170 cAlphaBits As Byte
1171 cAlphaShift As Byte
1172 cAccumBits As Byte
1173 cAccumRedBits As Byte
1174 cAccumGreenBits As Byte
1175 cAccumBlueBits As Byte
1176 cAccumAlphaBits As Byte
1177 cDepthBits As Byte
1178 cStencilBits As Byte
1179 cAuxBuffers As Byte
1180 iLayerType As Byte
1181 bReserved As Byte
1182 dwLayerMask As DWord
1183 dwVisibleMask As DWord
1184 dwDamageMask As DWord
1185End Type
1186TypeDef PPIXELFORMATDESCRIPTOR = *PIXELFORMATDESCRIPTOR
1187TypeDef LPPIXELFORMATDESCRIPTOR = *PIXELFORMATDESCRIPTOR
1188
1189Const PFD_TYPE_RGBA = 0
1190Const PFD_TYPE_COLORINDEX = 1
1191
1192Const PFD_MAIN_PLANE = 0
1193Const PFD_OVERLAY_PLANE = 1
1194Const PFD_UNDERLAY_PLANE = (-1)
1195
1196Const PFD_DOUBLEBUFFER = &H00000001
1197Const PFD_STEREO = &H00000002
1198Const PFD_DRAW_TO_WINDOW = &H00000004
1199Const PFD_DRAW_TO_BITMAP = &H00000008
1200Const PFD_SUPPORT_GDI = &H00000010
1201Const PFD_SUPPORT_OPENGL = &H00000020
1202Const PFD_GENERIC_FORMAT = &H00000040
1203Const PFD_NEED_PALETTE = &H00000080
1204Const PFD_NEED_SYSTEM_PALETTE = &H00000100
1205Const PFD_SWAP_EXCHANGE = &H00000200
1206Const PFD_SWAP_COPY = &H00000400
1207Const PFD_SWAP_LAYER_BUFFERS = &H00000800
1208Const PFD_GENERIC_ACCELERATED = &H00001000
1209Const PFD_SUPPORT_DIRECTDRAW = &H00002000
1210
1211Const PFD_DEPTH_DONTCARE = &H20000000
1212Const PFD_DOUBLEBUFFER_DONTCARE = &H40000000
1213Const PFD_STEREO_DONTCARE = &H80000000
1214
1215Declare Function ChoosePixelFormat Lib "gdi32" (hdc As HDC, ByRef lppfd As PIXELFORMATDESCRIPTOR) As Long
1216Declare Function DescribePixelFormat Lib "gdi32" (hdc As HDC, n As Long, u As DWord, ByRef lppfd As PIXELFORMATDESCRIPTOR) As Long
1217Declare Function GetPixelFormat Lib "gdi32" (hdc As HDC) As Long
1218Declare Function SetPixelFormat Lib "gdi32" (hdc As HDC, i As Long, ByRef lppfd As PIXELFORMATDESCRIPTOR) As BOOL
1219
1220
1221/* OpenGL Support */
1222
1223Declare Function wglCopyContext Lib "opengl32" (hglrcSource As HGLRC, hglrcDest As HGLRC, mask As DWord) As BOOL
1224Declare Function wglCreateContext Lib "opengl32" (hdc As HDC) As HGLRC
1225Declare Function wglCreateLayerContext Lib "opengl32" (hdc As HDC, iLayerPlane As Long) As HGLRC
1226Declare Function wglDeleteContext Lib "opengl32" (hglrc As HGLRC) As BOOL
1227Declare Function wglGetCurrentContext Lib "opengl32" () As HGLRC
1228Declare Function wglGetCurrentDC Lib "opengl32" () As HDC
1229Declare Function wglGetProcAddress Lib "opengl32" (lpstr As LPSTR) As PROC
1230Declare Function wglMakeCurrent Lib "opengl32" (hdc As HDC, hglrc As HGLRC) As BOOL
1231Declare Function wglShareLists Lib "opengl32" (hglrc1 As HGLRC, hglrc2 As HGLRC) As BOOL
[141]1232Declare Function wglUseFontBitmaps Lib "opengl32" Alias _FuncName_wglUseFontBitmaps (hdc As HDC, first As DWord, count As DWord, listbase As DWord) As BOOL
[1]1233Declare Function SwapBuffers Lib "gdi32" (hdc As HDC) As BOOL
1234
1235Type POINTFLOAT
1236 x As Single
1237 y As Single
1238End Type
1239TypeDef PPOINTFLOAT = *POINTFLOAT
1240
1241Type GLYPHMETRICSFLOAT
1242 gmfBlackBoxX As Single
1243 gmfBlackBoxY As Single
1244 gmfptGlyphOrigin As POINTFLOAT
1245 gmfCellIncX As Single
1246 gmfCellIncY As Single
1247End Type
1248TypeDef PGLYPHMETRICSFLOAT = *GLYPHMETRICSFLOAT
1249TypeDef LPGLYPHMETRICSFLOAT = *GLYPHMETRICSFLOAT
1250
1251Const WGL_FONT_LINES = 0
1252Const WGL_FONT_POLYGONS = 1
1253
[141]1254Declare Function wglUseFontOutlines Lib "opengl32" Alias _FuncName_wglUseFontOutlines (hdc As HDC, first As DWord, count As DWord, listbase As DWord, deviation As Single, extrusion As Single, format As Long, ByRef lpgmf As GLYPHMETRICSFLOAT) As BOOL
[1]1255
1256Type LAYERPLANEDESCRIPTOR
1257 nSize As Word
1258 nVersion As Word
1259 dwFlags As DWord
1260 iPixelType As Byte
1261 cColorBits As Byte
1262 cRedBits As Byte
1263 cRedShift As Byte
1264 cGreenBits As Byte
1265 cGreenShift As Byte
1266 cBlueBits As Byte
1267 cBlueShift As Byte
1268 cAlphaBits As Byte
1269 cAlphaShift As Byte
1270 cAccumBits As Byte
1271 cAccumRedBits As Byte
1272 cAccumGreenBits As Byte
1273 cAccumBlueBits As Byte
1274 cAccumAlphaBits As Byte
1275 cDepthBits As Byte
1276 cStencilBits As Byte
1277 cAuxBuffers As Byte
1278 iLayerPlane As Byte
1279 bReserved As Byte
1280 crTransparent As COLORREF
1281End Type
1282TypeDef PLAYERPLANEDESCRIPTOR = *LAYERPLANEDESCRIPTOR
1283TypeDef LPLAYERPLANEDESCRIPTOR = *LAYERPLANEDESCRIPTOR
1284
1285Const LPD_DOUBLEBUFFER = &H00000001
1286Const LPD_STEREO = &H00000002
1287Const LPD_SUPPORT_GDI = &H00000010
1288Const LPD_SUPPORT_OPENGL = &H00000020
1289Const LPD_SHARE_DEPTH = &H00000040
1290Const LPD_SHARE_STENCIL = &H00000080
1291Const LPD_SHARE_ACCUM = &H00000100
1292Const LPD_SWAP_EXCHANGE = &H00000200
1293Const LPD_SWAP_COPY = &H00000400
1294Const LPD_TRANSPARENT = &H00001000
1295Const LPD_TYPE_RGBA = 0
1296Const LPD_TYPE_COLORINDEX = 1
1297
1298Const WGL_SWAP_MAIN_PLANE = &H00000001
1299Const WGL_SWAP_OVERLAY1 = &H00000002
1300Const WGL_SWAP_OVERLAY2 = &H00000004
1301Const WGL_SWAP_OVERLAY3 = &H00000008
1302Const WGL_SWAP_OVERLAY4 = &H00000010
1303Const WGL_SWAP_OVERLAY5 = &H00000020
1304Const WGL_SWAP_OVERLAY6 = &H00000040
1305Const WGL_SWAP_OVERLAY7 = &H00000080
1306Const WGL_SWAP_OVERLAY8 = &H00000100
1307Const WGL_SWAP_OVERLAY9 = &H00000200
1308Const WGL_SWAP_OVERLAY10 = &H00000400
1309Const WGL_SWAP_OVERLAY11 = &H00000800
1310Const WGL_SWAP_OVERLAY12 = &H00001000
1311Const WGL_SWAP_OVERLAY13 = &H00002000
1312Const WGL_SWAP_OVERLAY14 = &H00004000
1313Const WGL_SWAP_OVERLAY15 = &H00008000
1314Const WGL_SWAP_UNDERLAY1 = &H00010000
1315Const WGL_SWAP_UNDERLAY2 = &H00020000
1316Const WGL_SWAP_UNDERLAY3 = &H00040000
1317Const WGL_SWAP_UNDERLAY4 = &H00080000
1318Const WGL_SWAP_UNDERLAY5 = &H00100000
1319Const WGL_SWAP_UNDERLAY6 = &H00200000
1320Const WGL_SWAP_UNDERLAY7 = &H00400000
1321Const WGL_SWAP_UNDERLAY8 = &H00800000
1322Const WGL_SWAP_UNDERLAY9 = &H01000000
1323Const WGL_SWAP_UNDERLAY10 = &H02000000
1324Const WGL_SWAP_UNDERLAY11 = &H04000000
1325Const WGL_SWAP_UNDERLAY12 = &H08000000
1326Const WGL_SWAP_UNDERLAY13 = &H10000000
1327Const WGL_SWAP_UNDERLAY14 = &H20000000
1328Const WGL_SWAP_UNDERLAY15 = &H40000000
1329
1330Declare Function wglDescribeLayerPlane Lib "opengl32" (hdc As HDC, iPixelFormat As Long, iLayerPlane As Long, nByte As DWord, ByRef lplpd As LAYERPLANEDESCRIPTOR) As BOOL
1331Declare Function wglSetLayerPaletteEntries Lib "opengl32" (hdc As HDC, iLayerPlane As Long, iStart As Long, cEntries As Long, lpcr As *COLORREF) As Long
1332Declare Function wglGetLayerPaletteEntries Lib "opengl32" (hdc As HDC, iLayerPlane As Long, iStart As Long, cEntries As Long, lpcr As *COLORREF) As Long
1333Declare Function wglRealizeLayerPalette Lib "opengl32" (hdc As HDC, iLayerPlane As Long, bRealize As BOOL) As BOOL
1334Declare Function wglSwapLayerBuffers Lib "opengl32" (hdc As HDC, fuPlanes As DWord) As BOOL
1335
1336Type WGLSWAP
1337 hdc As HDC
1338 uiFlags As DWord
1339End Type
1340TypeDef PWGLSWAP = *WGLSWAP
1341TypeDef LPWGLSWAP = *WGLSWAP
1342
1343Const WGL_SWAPMULTIPLE_MAX = 16
1344
1345'Declare Function wglSwapMultipleBuffers Lib "opengl32" (u As DWord, lpwglswap As *WGLSWAP) As DWord
1346
1347#endif '_INC_GDI
Note: See TracBrowser for help on using the repository browser.