' //Windows Stuff - delete it if it clashes with anything in your proj.//
'Declare Function GetFSR Lib "User" (ByVal fuSysResource As Integer) As Integer
Declare Function GetWINDIR Lib "Kernel" Alias "GetWindowsDirectory" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
Declare Function GetSYSDIR Lib "Kernel" Alias "GetSystemDirectory" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
'Declare Function SetCur Lib "User" (ByVal hCursor As Integer) As Integer
'Declare Sub SetCurPos Lib "User" (ByVal X As Integer, ByVal Y As Integer)
'Declare Sub InvRect Lib "User" (ByVal hDC As Integer, lpRect As TRECT)
Global ARECT As TRECT' //Use this variable for TRECT//
Global WINDIR As String' //Used in GetWinDirs()//
Global SYSDIR As String' //Used in GetWinDirs()//
' //Loads of GBLIB1c Function Declarations//
' //1) Upgraded/Changed from GBLIB1a and GBLIB1b//
Global i_RetVal As Integer' //Used as a Function return value//
Global Const GC_STRETCHED = 1' //For LoadDLLBitMap Functions//
Global Const GC_NOTSTRETCHED = 0' //For LoadDLLBitMap Functions//
Declare Function LoadDLLBitMap Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_BITMAP_ResName As String, ByVal hWnd As Integer, ByVal hDC As Integer, ByVal Stretch As Integer) As Integer
Declare Function LoadDLLBitmapTo Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_BITMAP_ResName As String, ByVal hWnd As Integer, ByVal hDC As Integer, ByVal i_Left As Integer, ByVal i_Top As Integer, ByVal i_Right As Integer, ByVal i_Bottom As Integer) As Integer
Declare Function LoadDLLBitmapFrom Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_BITMAP_ResName As String, ByVal hWnd As Integer, ByVal hDC As Integer, ByVal i_Left As Integer, ByVal i_Top As Integer, ByVal i_Right As Integer, ByVal i_Bottom As Integer) As Integer
Declare Function LoadDLLIcon Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_ICO_Resname As String, ByVal hWind As Integer, ByVal hDC As Integer) As Integer
Declare Function LoadDLLIconXY Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_ICO_Resname As String, ByVal hWind As Integer, ByVal hDC As Integer, ByVal i_Left As Integer, ByVal i_Top As Integer) As Integer
Declare Function LoadEXEIcon Lib "GBLIB1c.DLL" (ByVal hWind As Integer, ByVal hDC As Integer, ByVal szFilename As String) As Integer
Declare Function LoadEXEIconXY Lib "GBLIB1c.DLL" (ByVal hWind As Integer, ByVal hDC As Integer, ByVal szFilename As String, ByVal i_Left As Integer, ByVal i_Top As Integer) As Integer
Declare Sub WaitForL Lib "GBLIB1c.DLL" (ByVal MilliSeconds As Long)
Declare Sub WaitFor Lib "GBLIB1c.DLL" (ByVal Seconds As Integer)
Declare Sub StartWait Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
Declare Sub StopWait Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
Declare Sub WaitOne Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
Declare Sub DisableMouse Lib "GBLIB1c.DLL" ()
Declare Sub EnableMouse Lib "GBLIB1c.DLL" ()
Declare Function RegisterAppExt Lib "GBLIB1c.DLL" (ByVal sz_AppPath As String, ByVal sz_ExtNoDot As String) As Integer
Declare Function RegisterAppPrintExt Lib "GBLIB1c.DLL" (ByVal sz_AppPath As String, ByVal sz_ExtNoDot As String) As Integer
Declare Function UnRegisterAppExt Lib "GBLIB1c.DLL" (ByVal sz_ExtNoDot As String) As Integer
Declare Function UnRegisterAppPrintExt Lib "GBLIB1c.DLL" (ByVal sz_ExtNoDot As String) As Integer
Declare Function UnRegisterAll Lib "GBLIB1c.DLL" (ByVal sz_ExtNoDot As String) As Integer
' //2) Not Upgraded/Changed from GBLIB1a and GBLIB1b//
' // ROUTINES IN GBLIB1c GROUPED BY CATEGORY //
' //*** SYSTEM INFORMATION ***//
Declare Function GetNumColours Lib "GBLIB1c.DLL" () As Integer
' //*** DISK INFORMATION ***//
Declare Sub GBGetDiskSizeS Lib "GBLIB1c.DLL" (sz_Buff As String, i_BuffLen As Integer)
Declare Function GBGetDiskSizeL Lib "GBLIB1c.DLL" (ByVal sz_DriveLetter As String) As Long
Declare Sub GBGetDiskFreeS Lib "GBLIB1c.DLL" (sz_Buff As String, i_BuffLen As Integer)
Declare Function GBGetDiskSizeL Lib "GBLIB1c.DLL" (ByVal sz_DriveLetter As String) As Long
Declare Function GBIsFileInPath Lib "GBLIB1c.DLL" (ByVal sz_Filename As String) As Integer
' //*** FONTS ***//
Declare Function InstallAFont Lib "GBLIB1c.DLL" (ByVal sz_TTFPath As String, ByVal sz_StyleName As String) As Integer
' //*** BITMAPS ***//
Declare Function GetDLLBitMapSize Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_BITMAP_ResName As String, MyRECT As TRECT) As Integer
'LoadDLLBitMap (Declared above in section (1))
'LoadDLLBitmapTo (Declared above in section (1))
'LoadDLLBitmapFrom (Declared above in section (1))
' //*** ICONS ***//
' LoadDLLIcon (Declared above in section (1))
' LoadDLLIconXY (Declared above in section (1))
' LoadEXEIcon (Declared above in section (1))
' LoadEXEIconXY (Declared above in section (1))
' // *** SOUND (WAVE) ***//
Declare Function PlayDLLWave Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_WAVE_ResName As String) As Integer
' //PlayDLLWave plays synchronously//
' //For more flexibility...//
Declare Function PlayDLLWaveExt Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_WAVE_ResName As String, ByVal uFlags As Integer) As Integer
' //Constants for the uFlags parameter in PlayDLLWaveExt (Do not use snd_Memory)//
' //You can combine more than one with AND i.e. snd_NoDefault+snd_Loop = 10 //
Global Const snd_Sync = 0' { play synchronously (default) }
Global Const snd_Async = 1' { play asynchronously }
Global Const snd_NoDefault = 2' { don't use default sound }
Global Const snd_Loop = 8' { loop the sound until next sndPlaySound }
Global Const snd_NoStop = 16' { don't stop any currently playing sound }
Declare Sub SpeakerBeep Lib "GBLIB1c.DLL" ()
Declare Sub PlayLoop Lib "GBLIB1c.DLL" (ByVal sz_WaveFileWithPath As String)
Declare Sub StopLoop Lib "GBLIB1c.DLL" ()
Declare Sub PlaySound Lib "GBLIB1c.DLL" (ByVal sz_WaveFileWithPath As String)
Declare Function GetWaveVendorID Lib "GBLIB1c.DLL" () As Integer
Declare Function GetWaveProductID Lib "GBLIB1c.DLL" () As Integer
Declare Function GetWaveDriverVersion Lib "GBLIB1c.DLL" (Major As Integer, Minor As Integer) As Integer
Declare Function GetWaveProductName Lib "GBLIB1c.DLL" (ByVal szBuffer As String, i_Bufferlen As Integer) As Integer
Declare Function GetWaveNumChannels Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay811Mono Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay811Stereo Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay1611Mono Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay1611Stereo Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay822Mono Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay822Stereo Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay1622Mono Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay1622Stereo Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay844Mono Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay844Stereo Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay1644Mono Lib "GBLIB1c.DLL" () As Integer
Declare Function WillPlay1644Stereo Lib "GBLIB1c.DLL" () As Integer
Declare Sub Gordon Lib "GBLIB1c.DLL" ()
Declare Sub Marts Lib "GBLIB1c.DLL" ()
Declare Sub Click Lib "GBLIB1c.DLL" ()
Declare Sub clik Lib "GBLIB1c.DLL" ()
Declare Sub Done Lib "GBLIB1c.DLL" ()
Declare Sub SystemStart Lib "GBLIB1c.DLL" ()
Declare Sub SystemEnd Lib "GBLIB1c.DLL" ()
Declare Sub SystemBeep Lib "GBLIB1c.DLL" ()
Declare Sub SystemQuestion Lib "GBLIB1c.DLL" ()
Declare Sub SystemExclamation Lib "GBLIB1c.DLL" ()
Declare Sub SystemAsterisk Lib "GBLIB1c.DLL" ()
Declare Sub SystemHand Lib "GBLIB1c.DLL" ()
Declare Sub MouseClick Lib "GBLIB1c.DLL" ()
Declare Sub ProgramLaunch Lib "GBLIB1c.DLL" ()
' //*** SOUND (MIDI) ***//
Declare Function GetMIDIVendorID Lib "GBLIB1c.DLL" () As Integer
Declare Function GetMIDIProductID Lib "GBLIB1c.DLL" () As Integer
Declare Function GetMIDIDriverVersion Lib "GBLIB1c.DLL" (Major As Integer, Minor As Integer) As Integer
Declare Function GetMIDIProductName Lib "GBLIB1c.DLL" (ByVal szBuffer As String, i_Bufferlen As Integer) As Integer
Declare Function GetMIDIVoices Lib "GBLIB1c.DLL" () As Integer
Declare Function GetMIDINotes Lib "GBLIB1c.DLL" () As Integer
Declare Function GetMIDINumChannels Lib "GBLIB1c.DLL" () As Integer
Declare Function IsMIDIExternalSynth Lib "GBLIB1c.DLL" () As Integer
Declare Function IsMIDISquareWaveSynth Lib "GBLIB1c.DLL" () As Integer
Declare Function IsMIDIFMSynth Lib "GBLIB1c.DLL" () As Integer
Declare Function IsMIDIMapper Lib "GBLIB1c.DLL" () As Integer
Declare Function WillMidiDoVolume Lib "GBLIB1c.DLL" () As Integer
Declare Function WillMidiDoLRVolume Lib "GBLIB1c.DLL" () As Integer
Declare Function WillMidiDoCache Lib "GBLIB1c.DLL" () As Integer
' //*** CURSOR MANAGEMENT ***//
Declare Function LoadDLLCursor Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_CURSOR_ResName As String, ByVal hWind As Integer) As Integer
Declare Sub DestroyDLLCursor Lib "GBLIB1c.DLL" ()
Declare Function GBSetCursorPos Lib "GBLIB1c.DLL" (ByVal hWind As Integer, ByVal XPos As Integer, ByVal YPos As Integer) As Integer
Declare Function SetArrow Lib "GBLIB1c.DLL" (ByVal hWind As Integer) As Integer
'StartWait (Declared above in section (1))
'StopWait (Declared above in section (1))
'WaitOne (Declared above in section (1))
'DisableMouse (Declared above in section (1))
'EnableMouse (Declared above in section (1))
' //*** FILE MANAGEMENT ***//
Declare Sub EncodeSingle Lib "GBLIB1c.DLL" (ByVal sz_Source As String, ByVal sz_Dest As String, ByVal sz_Phrase As String)
Declare Function DecodeSingle Lib "GBLIB1c.DLL" (ByVal sz_Source As String, ByVal sz_Dest As String, ByVal sz_Phrase As String) As Integer
Declare Function GBDecompress Lib "GBLIB1c.DLL" (ByVal InfilePath As String, ByVal OutfilePath As String) As Integer
Declare Function GBIsFileInPath Lib "GBLIB1c.DLL" (ByVal sz_Filename As String) As Integer
' //*** PROGRAMS ***//
Declare Function ModalCalc Lib "GBLIB1c.DLL" () As Integer
Declare Function ModalNotePadExec Lib "GBLIB1c.DLL" (ByVal szFilePath As String) As Integer
Declare Function ModalNotePad Lib "GBLIB1c.DLL" () As Integer
' //*** WINDOW MANAGEMENT ***//
Declare Sub GBPutOnTop Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
Declare Sub GBNotOnTop Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
Declare Sub SubClassIt Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
Declare Sub UnSubClassIt Lib "GBLIB1c.DLL" ()
' //*** JOYSTICK SERVICES ***//
Declare Sub SetUpJoystick Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
Declare Sub UnSetUpJoyStick Lib "GBLIB1c.DLL" ()
Declare Function GetJoyPos Lib "GBLIB1c.DLL" (XPos As Integer, YPos As Integer, ZPos As Integer, Button1 As Integer, Button2 As Integer) As Integer
' //*** MISCELLANEOUS ***//
Declare Function GetDLLText Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_TEXT_ResName As String, ByVal sz_Buffer As String, i_BufferMaxLen As Integer) As Integer
Declare Function LoadDLLDialog Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_DIALOG_ResName As String, ByVal hWind As Integer) As Integer
Declare Sub MakeUAE Lib "GBLIB1c.DLL" ()
Declare Sub GBClientToScreenRECT Lib "GBLIB1c.DLL" (ByVal hWind As Integer, ScreenRECT As TRECT)
Declare Sub About Lib "GBLIB1c.DLL" ()
Declare Sub AboutHelp Lib "GBLIB1c.DLL" ()
' //Index of all functions in GBLIB1c.DLL by Index//
' About index 1,
' PlayDLLWave index 2,
' LoadDLLBitmap index 3,
' GetDLLText index 4,
' GetDLLBitmapSize index 5,
' LoadDLLBitmapTo index 6,
' PlayResource index 7,
' Gordon index 8,
' Marts index 9,
' PlayLoop index 10,
' StopLoop index 11,
' Clik index 12,
' Click index 13,
' Done index 14,
' SystemStart index 15,
' SystemEnd index 16,
' SystemBeep index 17,
' SystemQuestion index 18,
' SystemExclamation index 19,
' SystemAsterisk index 20,
' SystemHand index 21,
' MouseClick index 22,
' ProgramLaunch index 23,
' PlaySound index 24,
' LoadDLLBitmapFrom index 25,
' LoadDLLDialog index 26,
' LoadDLLIcon index 27,
' LoadDLLCursor index 28,
' DestroyDLLCursor index 29,
' SetArrow index 30,
' GBSetCursorPos index 31,
'
' GBClientToScreenRECT index 32,
'
' GBDecompress index 33,
'
' GBPutOnTop index 34,
' GBNotOnTop index 35,
'
' ModalCalc index 36,
' ModalNotePad index 37,
' ModalNotePadExec index 38,
'
' MakeUAE index 39,
'
' WaitForL index 40,
' WaitFor index 41,
'
' SpeakerBeep index 42,
'
' StartWait index 43,
' StopWait index 44,
' WaitOne index 45,
'
' LoadEXEIcon index 46,
'
' SubClassIt index 47,
' UnSubClassIt index 48,
'
' LoadEXEIconXY index 49,
' LoadDLLIconXY index 50,
'
' SetUpJoystick index 51,
' UnSetUpJoyStick index 52,
'
' WillPlay811Mono index 53,
' WillPlay811Stereo index 54,
' WillPlay1611Mono index 55,
' WillPlay1611Stereo index 56,
' WillPlay822Mono index 57,
' WillPlay822Stereo index 58,
' WillPlay1622Mono index 59,
' WillPlay1622Stereo index 60,
' WillPlay844Mono index 61,
' WillPlay844Stereo index 62,
' WillPlay1644Mono index 63,
' WillPlay1644Stereo index 64,
' GetWaveVendorID index 65,
' GetWaveProductID Index 66,
' GetWaveDriverVersion Index 67,
' GetWaveProductName Index 68,
' GetWaveNumChannels Index 69,
'
' GetMIDIVendorID index 70,
' GetMIDIProductID Index 71,
' GetMIDIDriverVersion Index 72,
' GetMIDIProductName Index 73,
' GetMIDIVoices Index 74,
' GetMIDINotes Index 75,
' GetMIDINumChannels Index 76,
'
' IsMIDIExternalSynth Index 77,
' IsMIDISquareWaveSynth Index 78,
' IsMIDIFMSynth Index 79,
' IsMIDIGenericSynth Index 80,
' IsMIDIMapper Index 81,
'
' WillMidiDoVolume Index 82,
' WillMidiDoLRVolume Index 83,
' WillMidiDoCache Index 84,
'
' PlayDLLWaveExt Index 85,
'
' GBGetDiskSizeS Index 86,
' GBGetDiskSizeL Index 87,
' GBGetDiskFreeS Index 88,
' GBGetDiskFreeL Index 89,
' GBIsFileInPath Index 90,
'
' EncodeSingle Index 91,
' DecodeSingle Index 92,
'
' InstallAFont Index 93,
' AboutHelp Index 94,
' GetNumColours Index 95,
'
' DisableMouse Index 96,
' EnableMouse Index 97,
' GetJoyPos Index 98,
' RegisterAppExt Index 99,
' RegisterAppPrintExt Index 100,
' UnRegisterAppExt Index 101,
' UnRegisterAppPrintExt Index 102,
' UnRegisterAll Index 103;
Sub GETWINDIRS ()
' /* Modified 01/12/94 [GB] */
Dim i_Length As Integer
Dim sz_Buffer As String * 255
Dim i_Size As Integer
i_Size = 255' //Length of buffer//
i_Length = GetWINDIR(sz_Buffer, i_Size)
WINDIR = Left$(sz_Buffer, i_Length)
i_Size = 255' //Length of buffer//
i_Length = GetSYSDIR(sz_Buffer, i_Size)
SYSDIR = Left$(sz_Buffer, i_Length)
End Sub
Sub LoadAnIcon (c As Control, sz_DLLPath As String, sz_ResName As String)