source: Include/api_gdi.sbp@ 160

Last change on this file since 160 was 160, checked in by イグトランス (egtra), 17 years ago

API宣言の追加(主にフォーラムに投稿されたものより)

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