home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / grafik / metapr / global.bas < prev    next >
Encoding:
BASIC Source File  |  1993-06-17  |  3.1 KB  |  76 lines

  1. Option Explicit
  2.  
  3. 'Windows Type Declarations
  4.  
  5.  
  6. Type POINTAPI
  7.     X As Integer
  8.     Y As Integer
  9. End Type
  10.  
  11.  
  12. Type RECT
  13.   left As Integer
  14.   top As Integer
  15.   right As Integer
  16.   bottom As Integer
  17. End Type
  18.  
  19. Type SIZE
  20.     cx As Integer
  21.     cy As Integer
  22. End Type
  23.  
  24. 'Program Globals
  25.  
  26.  Global file As String
  27.  Global GhMF As Integer
  28.  Global boxscale
  29.  
  30. 'Windows Globals
  31.  
  32.  Global Const GMEM_MOVEABLE = &H2
  33.  
  34. 'Windows 3.1 API Function Declarations
  35.  
  36.  Declare Function SetMapMode Lib "GDI" (ByVal hdc As Integer, ByVal nMapMode As Integer) As Integer
  37.  Declare Function setviewportExt Lib "GDI" (ByVal hdc As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
  38.  Declare Function setviewportorg Lib "GDI" (ByVal hdc As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
  39.  Declare Function SaveDC Lib "GDI" (ByVal hdc As Integer) As Integer
  40.  Declare Function RestoreDC Lib "GDI" (ByVal hdc As Integer, ByVal nSavedDC As Integer) As Integer
  41.  Declare Function playmetafile Lib "GDI" (ByVal hdc As Integer, ByVal hMF As Integer) As Integer
  42.  Declare Function SetMetafileBits Lib "GDI" (ByVal hMem As Integer) As Integer
  43.  Declare Function deletemetafile Lib "GDI" (ByVal hMF As Integer) As Integer
  44.  Declare Function hread Lib "Kernel" Alias "_hread" (ByVal hFile As Integer, ByVal hBuffer As Long, ByVal cbBuffer As Long) As Long
  45.  Declare Function llseek Lib "Kernel" Alias "_llseek" (ByVal hFile As Integer, ByVal lOffset As Long, ByVal iOrigin As Integer) As Long
  46.  Declare Function GlobalAlloc Lib "Kernel" (ByVal wFlags As Integer, ByVal dwBytes As Long) As Integer
  47.  Declare Function GlobalLock Lib "Kernel" (ByVal hMem As Integer) As Long
  48.  Declare Function GlobalUnlock Lib "Kernel" (ByVal hMem As Integer) As Integer
  49.  Declare Function GlobalFree Lib "Kernel" (ByVal hMem As Integer) As Integer
  50.  Declare Sub GetWindowRect Lib "User" (ByVal hWnd As Integer, lpRect As RECT)
  51.  Declare Sub ClipCursor Lib "User" (lpRect As Any)
  52.  Declare Sub ClipCursorClear Lib "User" Alias "ClipCursor" (ByVal zero As Long)
  53.  Declare Sub clienttoscreen Lib "User" (ByVal hWnd As Integer, lpPoint As POINTAPI)
  54.  Declare Sub ScreenToClient Lib "User" (ByVal hWnd As Integer, lpPoint As POINTAPI)
  55.  Declare Sub MapWindowPoints Lib "User" (ByVal hwndFrom As Integer, ByVal hwndTo As Integer, lppt As POINTAPI, ByVal cPoints As Integer)
  56.  Declare Function createcompatibledc Lib "GDI" (ByVal hdc As Integer) As Integer
  57.  Declare Function closemetafile Lib "GDI" (ByVal hMF As Integer) As Integer
  58.  Declare Function createmetafilebynum Lib "GDI" Alias "createmetafile" (ByVal lpString As Long) As Integer
  59.  Declare Function createmetafile Lib "GDI" (ByVal lpString As String) As Integer
  60.  Declare Function setviewportExtEx Lib "GDI" (ByVal hdc As Integer, ByVal nX As Integer, ByVal nY As Integer, lpSize As size) As Integer
  61.  Declare Function SetWindowExt Lib "GDI" (ByVal hdc As Integer, ByVal X As Integer, ByVal Y As Integer) As Long
  62.  
  63.                     
  64. 'you will not find this in the Windows API
  65. 'Type declarations
  66.  
  67. Type MetaFileHeader
  68.   Key As Long
  69.   hMF As Integer
  70.   bbox As RECT
  71.   inch As Integer
  72.   reserved As Long
  73.   checksum As Integer
  74. End Type
  75.  
  76.