home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "ApiFuncs"
- Option Explicit
-
- ' Pen constants.
- Global Const PS_SOLID = 0
- Global Const WHITE_PEN = 6
- Global Const BLACK_PEN = 7
-
- Global Const GRAY_BRUSH = 2
- Global Const BLACK_BRUSH = 4
-
- Global Const ALTERNATE = 1 ' Polygon fill mode.
-
- #If Win32 Then
- Type POINTAPI
- x As Long
- y As Long
- End Type
- Declare Function GetStockObject Lib "gdi32" (ByVal nIndex As Long) As Long
- Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
- Declare Function SetPolyFillMode Lib "gdi32" (ByVal hdc As Long, ByVal nPolyFillMode As Long) As Long
- Declare Function Polyline Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
- Declare Function Polygon Lib "gdi32" (ByVal hdc As Long, lpPoint As POINTAPI, ByVal nCount As Long) As Long
- Declare Function API_MoveTo Lib "gdi32" Alias "MoveToEx" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, lpPoint As Any) As Long
- Declare Function API_LineTo Lib "gdi32" Alias "LineTo" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
- Declare Function CreatePen Lib "gdi32" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long
- Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long
- Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
- #Else
- Type POINTAPI
- x As Integer
- y As Integer
- End Type
- Declare Function GetStockObject Lib "GDI" (ByVal nIndex As Integer) As Integer
- Declare Function SelectObject Lib "GDI" (ByVal hdc As Integer, ByVal hObject As Integer) As Integer
- Declare Function SetPolyFillMode Lib "GDI" (ByVal hdc As Integer, ByVal nPolyFillMode As Integer) As Integer
- Declare Function Polyline Lib "GDI" (ByVal hdc As Integer, lpPoints As POINTAPI, ByVal nCount As Integer) As Integer
- Declare Function Polygon Lib "GDI" (ByVal hdc As Integer, lpPoints As POINTAPI, ByVal nCount As Integer) As Integer
- Declare Function API_MoveTo Lib "GDI" Alias "MoveTo" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer) As Long
- Declare Function API_LineTo Lib "GDI" Alias "LineTo" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
- Declare Function CreatePen Lib "GDI" (ByVal nPenStyle As Integer, ByVal nWidth As Integer, ByVal crColor As Long) As Integer
- Declare Function CreateSolidBrush Lib "GDI" (ByVal crColor As Long) As Integer
- Declare Function DeleteObject Lib "GDI" (ByVal hObject As Integer) As Integer
- #End If
-