home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / win / prg / gblib1c / gblib1c.bas < prev    next >
BASIC Source File  |  1995-05-02  |  17KB  |  392 lines

  1. Option Explicit
  2.  
  3.  
  4. '   /* Modified Saturday 29 April 1995 [GB] */
  5. '   /* Modified 13/12/94 [GB] */
  6. '   /* Modified 01/12/94 [GB] */
  7. '   // Modified 16/10/94 [GB] //
  8. Type TRECT
  9.      Left As Integer
  10.      Top As Integer
  11.      Right As Integer
  12.      Bottom As Integer
  13. End Type
  14.  
  15.  
  16. '   //Windows Stuff - delete it if it clashes with anything in your proj.//
  17. 'Declare Function GetFSR Lib "User" (ByVal fuSysResource As Integer) As Integer
  18. Declare Function GetWINDIR Lib "Kernel" Alias "GetWindowsDirectory" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
  19. Declare Function GetSYSDIR Lib "Kernel" Alias "GetSystemDirectory" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
  20. 'Declare Function SetCur Lib "User" (ByVal hCursor As Integer) As Integer
  21. 'Declare Sub SetCurPos Lib "User" (ByVal X As Integer, ByVal Y As Integer)
  22. 'Declare Sub InvRect Lib "User" (ByVal hDC As Integer, lpRect As TRECT)
  23.  
  24. Global ARECT As TRECT'              //Use this variable for TRECT//
  25. Global WINDIR As String'            //Used in GetWinDirs()//
  26. Global SYSDIR As String'            //Used in GetWinDirs()//
  27. '   //Loads of GBLIB1c Function Declarations//
  28.  
  29.  
  30. '   //1) Upgraded/Changed from GBLIB1a and GBLIB1b//
  31. Global i_RetVal As Integer'         //Used as a Function return value//
  32. Global Const GC_STRETCHED = 1'      //For LoadDLLBitMap Functions//
  33. Global Const GC_NOTSTRETCHED = 0'   //For LoadDLLBitMap Functions//
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. Declare Function LoadEXEIcon Lib "GBLIB1c.DLL" (ByVal hWind As Integer, ByVal hDC As Integer, ByVal szFilename As String) As Integer
  40. 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
  41. Declare Sub WaitForL Lib "GBLIB1c.DLL" (ByVal MilliSeconds As Long)
  42. Declare Sub WaitFor Lib "GBLIB1c.DLL" (ByVal Seconds As Integer)
  43. Declare Sub StartWait Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
  44. Declare Sub StopWait Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
  45. Declare Sub WaitOne Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
  46. Declare Sub DisableMouse Lib "GBLIB1c.DLL" ()
  47. Declare Sub EnableMouse Lib "GBLIB1c.DLL" ()
  48. Declare Function RegisterAppExt Lib "GBLIB1c.DLL" (ByVal sz_AppPath As String, ByVal sz_ExtNoDot As String) As Integer
  49. Declare Function RegisterAppPrintExt Lib "GBLIB1c.DLL" (ByVal sz_AppPath As String, ByVal sz_ExtNoDot As String) As Integer
  50. Declare Function UnRegisterAppExt Lib "GBLIB1c.DLL" (ByVal sz_ExtNoDot As String) As Integer
  51. Declare Function UnRegisterAppPrintExt Lib "GBLIB1c.DLL" (ByVal sz_ExtNoDot As String) As Integer
  52. Declare Function UnRegisterAll Lib "GBLIB1c.DLL" (ByVal sz_ExtNoDot As String) As Integer
  53.  
  54. '   //2) Not Upgraded/Changed from GBLIB1a and GBLIB1b//
  55.  
  56. '   // ROUTINES IN GBLIB1c GROUPED BY CATEGORY //
  57.  
  58. '   //*** SYSTEM INFORMATION ***//
  59. Declare Function GetNumColours Lib "GBLIB1c.DLL" () As Integer
  60.  
  61. '   //*** DISK INFORMATION ***//
  62. Declare Sub GBGetDiskSizeS Lib "GBLIB1c.DLL" (sz_Buff As String, i_BuffLen As Integer)
  63. Declare Function GBGetDiskSizeL Lib "GBLIB1c.DLL" (ByVal sz_DriveLetter As String) As Long
  64. Declare Sub GBGetDiskFreeS Lib "GBLIB1c.DLL" (sz_Buff As String, i_BuffLen As Integer)
  65. Declare Function GBGetDiskSizeL Lib "GBLIB1c.DLL" (ByVal sz_DriveLetter As String) As Long
  66. Declare Function GBIsFileInPath Lib "GBLIB1c.DLL" (ByVal sz_Filename As String) As Integer
  67.  
  68. '   //*** FONTS ***//
  69. Declare Function InstallAFont Lib "GBLIB1c.DLL" (ByVal sz_TTFPath As String, ByVal sz_StyleName As String) As Integer
  70.  
  71. '   //*** BITMAPS ***//
  72. Declare Function GetDLLBitMapSize Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_BITMAP_ResName As String, MyRECT As TRECT) As Integer
  73. 'LoadDLLBitMap (Declared above in section (1))
  74. 'LoadDLLBitmapTo (Declared above in section (1))
  75. 'LoadDLLBitmapFrom (Declared above in section (1))
  76.  
  77. '   //*** ICONS ***//
  78. ' LoadDLLIcon (Declared above in section (1))
  79. ' LoadDLLIconXY (Declared above in section (1))
  80. ' LoadEXEIcon (Declared above in section (1))
  81. ' LoadEXEIconXY (Declared above in section (1))
  82.  
  83.  
  84. '   // *** SOUND (WAVE) ***//
  85. Declare Function PlayDLLWave Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_WAVE_ResName As String) As Integer
  86. '   //PlayDLLWave plays synchronously//
  87.  
  88. '   //For more flexibility...//
  89. Declare Function PlayDLLWaveExt Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_WAVE_ResName As String, ByVal uFlags As Integer) As Integer
  90. '   //Constants for the uFlags parameter in PlayDLLWaveExt (Do not use snd_Memory)//
  91. '   //You can combine more than one with AND i.e. snd_NoDefault+snd_Loop = 10 //
  92. Global Const snd_Sync = 0'  { play synchronously (default) }
  93. Global Const snd_Async = 1'  { play asynchronously }
  94. Global Const snd_NoDefault = 2'  { don't use default sound }
  95. Global Const snd_Loop = 8'  { loop the sound until next sndPlaySound }
  96. Global Const snd_NoStop = 16'  { don't stop any currently playing sound }
  97.  
  98. Declare Sub SpeakerBeep Lib "GBLIB1c.DLL" ()
  99. Declare Sub PlayLoop Lib "GBLIB1c.DLL" (ByVal sz_WaveFileWithPath As String)
  100. Declare Sub StopLoop Lib "GBLIB1c.DLL" ()
  101. Declare Sub PlaySound Lib "GBLIB1c.DLL" (ByVal sz_WaveFileWithPath As String)
  102.  
  103. Declare Function GetWaveVendorID Lib "GBLIB1c.DLL" () As Integer
  104. Declare Function GetWaveProductID Lib "GBLIB1c.DLL" () As Integer
  105. Declare Function GetWaveDriverVersion Lib "GBLIB1c.DLL" (Major As Integer, Minor As Integer) As Integer
  106. Declare Function GetWaveProductName Lib "GBLIB1c.DLL" (ByVal szBuffer As String, i_Bufferlen As Integer) As Integer
  107. Declare Function GetWaveNumChannels Lib "GBLIB1c.DLL" () As Integer
  108.  
  109. Declare Function WillPlay811Mono Lib "GBLIB1c.DLL" () As Integer
  110. Declare Function WillPlay811Stereo Lib "GBLIB1c.DLL" () As Integer
  111. Declare Function WillPlay1611Mono Lib "GBLIB1c.DLL" () As Integer
  112. Declare Function WillPlay1611Stereo Lib "GBLIB1c.DLL" () As Integer
  113.  
  114. Declare Function WillPlay822Mono Lib "GBLIB1c.DLL" () As Integer
  115. Declare Function WillPlay822Stereo Lib "GBLIB1c.DLL" () As Integer
  116. Declare Function WillPlay1622Mono Lib "GBLIB1c.DLL" () As Integer
  117. Declare Function WillPlay1622Stereo Lib "GBLIB1c.DLL" () As Integer
  118.  
  119. Declare Function WillPlay844Mono Lib "GBLIB1c.DLL" () As Integer
  120. Declare Function WillPlay844Stereo Lib "GBLIB1c.DLL" () As Integer
  121. Declare Function WillPlay1644Mono Lib "GBLIB1c.DLL" () As Integer
  122. Declare Function WillPlay1644Stereo Lib "GBLIB1c.DLL" () As Integer
  123.  
  124. Declare Sub Gordon Lib "GBLIB1c.DLL" ()
  125. Declare Sub Marts Lib "GBLIB1c.DLL" ()
  126. Declare Sub Click Lib "GBLIB1c.DLL" ()
  127. Declare Sub clik Lib "GBLIB1c.DLL" ()
  128. Declare Sub Done Lib "GBLIB1c.DLL" ()
  129. Declare Sub SystemStart Lib "GBLIB1c.DLL" ()
  130. Declare Sub SystemEnd Lib "GBLIB1c.DLL" ()
  131. Declare Sub SystemBeep Lib "GBLIB1c.DLL" ()
  132. Declare Sub SystemQuestion Lib "GBLIB1c.DLL" ()
  133. Declare Sub SystemExclamation Lib "GBLIB1c.DLL" ()
  134. Declare Sub SystemAsterisk Lib "GBLIB1c.DLL" ()
  135. Declare Sub SystemHand Lib "GBLIB1c.DLL" ()
  136. Declare Sub MouseClick Lib "GBLIB1c.DLL" ()
  137. Declare Sub ProgramLaunch Lib "GBLIB1c.DLL" ()
  138.  
  139. '   //*** SOUND (MIDI) ***//
  140. Declare Function GetMIDIVendorID Lib "GBLIB1c.DLL" () As Integer
  141. Declare Function GetMIDIProductID Lib "GBLIB1c.DLL" () As Integer
  142. Declare Function GetMIDIDriverVersion Lib "GBLIB1c.DLL" (Major As Integer, Minor As Integer) As Integer
  143. Declare Function GetMIDIProductName Lib "GBLIB1c.DLL" (ByVal szBuffer As String, i_Bufferlen As Integer) As Integer
  144. Declare Function GetMIDIVoices Lib "GBLIB1c.DLL" () As Integer
  145. Declare Function GetMIDINotes Lib "GBLIB1c.DLL" () As Integer
  146. Declare Function GetMIDINumChannels Lib "GBLIB1c.DLL" () As Integer
  147.  
  148. Declare Function IsMIDIExternalSynth Lib "GBLIB1c.DLL" () As Integer
  149. Declare Function IsMIDISquareWaveSynth Lib "GBLIB1c.DLL" () As Integer
  150. Declare Function IsMIDIFMSynth Lib "GBLIB1c.DLL" () As Integer
  151. Declare Function IsMIDIMapper Lib "GBLIB1c.DLL" () As Integer
  152.  
  153. Declare Function WillMidiDoVolume Lib "GBLIB1c.DLL" () As Integer
  154. Declare Function WillMidiDoLRVolume Lib "GBLIB1c.DLL" () As Integer
  155. Declare Function WillMidiDoCache Lib "GBLIB1c.DLL" () As Integer
  156.  
  157. '   //*** CURSOR MANAGEMENT ***//
  158. Declare Function LoadDLLCursor Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_CURSOR_ResName As String, ByVal hWind As Integer) As Integer
  159. Declare Sub DestroyDLLCursor Lib "GBLIB1c.DLL" ()
  160. Declare Function GBSetCursorPos Lib "GBLIB1c.DLL" (ByVal hWind As Integer, ByVal XPos As Integer, ByVal YPos As Integer) As Integer
  161. Declare Function SetArrow Lib "GBLIB1c.DLL" (ByVal hWind As Integer) As Integer
  162. 'StartWait (Declared above in section (1))
  163. 'StopWait (Declared above in section (1))
  164. 'WaitOne (Declared above in section (1))
  165. 'DisableMouse (Declared above in section (1))
  166. 'EnableMouse (Declared above in section (1))
  167.  
  168. '   //*** FILE MANAGEMENT ***//
  169. Declare Sub EncodeSingle Lib "GBLIB1c.DLL" (ByVal sz_Source As String, ByVal sz_Dest As String, ByVal sz_Phrase As String)
  170. Declare Function DecodeSingle Lib "GBLIB1c.DLL" (ByVal sz_Source As String, ByVal sz_Dest As String, ByVal sz_Phrase As String) As Integer
  171. Declare Function GBDecompress Lib "GBLIB1c.DLL" (ByVal InfilePath As String, ByVal OutfilePath As String) As Integer
  172. Declare Function GBIsFileInPath Lib "GBLIB1c.DLL" (ByVal sz_Filename As String) As Integer
  173.  
  174. '   //*** PROGRAMS ***//
  175. Declare Function ModalCalc Lib "GBLIB1c.DLL" () As Integer
  176. Declare Function ModalNotePadExec Lib "GBLIB1c.DLL" (ByVal szFilePath As String) As Integer
  177. Declare Function ModalNotePad Lib "GBLIB1c.DLL" () As Integer
  178.  
  179. '   //*** WINDOW MANAGEMENT ***//
  180. Declare Sub GBPutOnTop Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
  181. Declare Sub GBNotOnTop Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
  182. Declare Sub SubClassIt Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
  183. Declare Sub UnSubClassIt Lib "GBLIB1c.DLL" ()
  184.  
  185. '   //*** JOYSTICK SERVICES ***//
  186. Declare Sub SetUpJoystick Lib "GBLIB1c.DLL" (ByVal hWind As Integer)
  187. Declare Sub UnSetUpJoyStick Lib "GBLIB1c.DLL" ()
  188. Declare Function GetJoyPos Lib "GBLIB1c.DLL" (XPos As Integer, YPos As Integer, ZPos As Integer, Button1 As Integer, Button2 As Integer) As Integer
  189.  
  190. '   //*** MISCELLANEOUS ***//
  191. 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
  192. Declare Function LoadDLLDialog Lib "GBLIB1c.DLL" (ByVal sz_DLLFile As String, ByVal sz_DIALOG_ResName As String, ByVal hWind As Integer) As Integer
  193. Declare Sub MakeUAE Lib "GBLIB1c.DLL" ()
  194. Declare Sub GBClientToScreenRECT Lib "GBLIB1c.DLL" (ByVal hWind As Integer, ScreenRECT As TRECT)
  195. Declare Sub About Lib "GBLIB1c.DLL" ()
  196. Declare Sub AboutHelp Lib "GBLIB1c.DLL" ()
  197.  
  198.  
  199. '   //Index of all functions in GBLIB1c.DLL by Index//
  200. ' About                 index 1,
  201. ' PlayDLLWave           index 2,
  202. ' LoadDLLBitmap         index 3,
  203. ' GetDLLText            index 4,
  204. ' GetDLLBitmapSize      index 5,
  205. ' LoadDLLBitmapTo       index 6,
  206. ' PlayResource          index 7,
  207. ' Gordon                index 8,
  208. ' Marts                 index 9,
  209. ' PlayLoop              index 10,
  210. ' StopLoop              index 11,
  211. ' Clik                  index 12,
  212. ' Click                 index 13,
  213. ' Done                  index 14,
  214. ' SystemStart           index 15,
  215. ' SystemEnd             index 16,
  216. ' SystemBeep            index 17,
  217. ' SystemQuestion        index 18,
  218. ' SystemExclamation     index 19,
  219. ' SystemAsterisk        index 20,
  220. ' SystemHand            index 21,
  221. ' MouseClick            index 22,
  222. ' ProgramLaunch         index 23,
  223. ' PlaySound             index 24,
  224. ' LoadDLLBitmapFrom     index 25,
  225. ' LoadDLLDialog         index 26,
  226. ' LoadDLLIcon           index 27,
  227. ' LoadDLLCursor         index 28,
  228. ' DestroyDLLCursor      index 29,
  229. ' SetArrow              index 30,
  230. ' GBSetCursorPos        index 31,
  231. '
  232. ' GBClientToScreenRECT  index 32,
  233. '
  234. ' GBDecompress          index 33,
  235. '
  236. ' GBPutOnTop            index 34,
  237. ' GBNotOnTop            index 35,
  238. '
  239. ' ModalCalc             index 36,
  240. ' ModalNotePad          index 37,
  241. ' ModalNotePadExec      index 38,
  242. '
  243. ' MakeUAE               index 39,
  244. '
  245. ' WaitForL              index 40,
  246. ' WaitFor               index 41,
  247. '
  248. ' SpeakerBeep           index 42,
  249. '
  250. ' StartWait             index 43,
  251. ' StopWait              index 44,
  252. ' WaitOne               index 45,
  253. '
  254. ' LoadEXEIcon           index 46,
  255. '
  256. ' SubClassIt            index 47,
  257. ' UnSubClassIt          index 48,
  258. '
  259. ' LoadEXEIconXY         index 49,
  260. ' LoadDLLIconXY         index 50,
  261. '
  262. ' SetUpJoystick         index 51,
  263. ' UnSetUpJoyStick       index 52,
  264. '
  265. ' WillPlay811Mono       index 53,
  266. ' WillPlay811Stereo     index 54,
  267. ' WillPlay1611Mono      index 55,
  268. ' WillPlay1611Stereo    index 56,
  269. ' WillPlay822Mono       index 57,
  270. ' WillPlay822Stereo     index 58,
  271. ' WillPlay1622Mono      index 59,
  272. ' WillPlay1622Stereo    index 60,
  273. ' WillPlay844Mono       index 61,
  274. ' WillPlay844Stereo     index 62,
  275. ' WillPlay1644Mono      index 63,
  276. ' WillPlay1644Stereo    index 64,
  277. ' GetWaveVendorID       index 65,
  278. ' GetWaveProductID      Index 66,
  279. ' GetWaveDriverVersion  Index 67,
  280. ' GetWaveProductName    Index 68,
  281. ' GetWaveNumChannels    Index 69,
  282. '
  283. ' GetMIDIVendorID       index 70,
  284. ' GetMIDIProductID      Index 71,
  285. ' GetMIDIDriverVersion  Index 72,
  286. ' GetMIDIProductName    Index 73,
  287. ' GetMIDIVoices         Index 74,
  288. ' GetMIDINotes          Index 75,
  289. ' GetMIDINumChannels    Index 76,
  290. '
  291. ' IsMIDIExternalSynth   Index 77,
  292. ' IsMIDISquareWaveSynth Index 78,
  293. ' IsMIDIFMSynth         Index 79,
  294. ' IsMIDIGenericSynth    Index 80,
  295. ' IsMIDIMapper          Index 81,
  296. '
  297. ' WillMidiDoVolume      Index 82,
  298. ' WillMidiDoLRVolume    Index 83,
  299. ' WillMidiDoCache       Index 84,
  300. '
  301. ' PlayDLLWaveExt        Index 85,
  302. '
  303. ' GBGetDiskSizeS        Index 86,
  304. ' GBGetDiskSizeL        Index 87,
  305. ' GBGetDiskFreeS        Index 88,
  306. ' GBGetDiskFreeL        Index 89,
  307. ' GBIsFileInPath        Index 90,
  308. '
  309. ' EncodeSingle          Index 91,
  310. ' DecodeSingle          Index 92,
  311. '
  312. ' InstallAFont          Index 93,
  313. ' AboutHelp             Index 94,
  314. ' GetNumColours         Index 95,
  315. '
  316. ' DisableMouse          Index 96,
  317. ' EnableMouse           Index 97,
  318. ' GetJoyPos             Index 98,
  319.  
  320. ' RegisterAppExt        Index 99,
  321. ' RegisterAppPrintExt   Index 100,
  322. ' UnRegisterAppExt      Index 101,
  323. ' UnRegisterAppPrintExt Index 102,
  324. ' UnRegisterAll         Index 103;
  325.  
  326.  
  327. Sub GETWINDIRS ()
  328. '   /* Modified 01/12/94 [GB] */
  329.  
  330. Dim i_Length As Integer
  331. Dim sz_Buffer As String * 255
  332. Dim i_Size As Integer
  333.  
  334. i_Size = 255' //Length of buffer//
  335. i_Length = GetWINDIR(sz_Buffer, i_Size)
  336. WINDIR = Left$(sz_Buffer, i_Length)
  337.  
  338. i_Size = 255' //Length of buffer//
  339. i_Length = GetSYSDIR(sz_Buffer, i_Size)
  340. SYSDIR = Left$(sz_Buffer, i_Length)
  341.  
  342. End Sub
  343.  
  344. Sub LoadAnIcon (c As Control, sz_DLLPath As String, sz_ResName As String)
  345. '   /* Modified Sunday 30 April 1995 [GB] */
  346.  
  347. If TypeOf c Is PictureBox Then
  348.     '   //Store the current Autoredraw setting//
  349.     Dim i_Store As Integer
  350.     i_Store = c.AutoRedraw
  351.     
  352.     '   //Enable the background hDC//
  353.     c.AutoRedraw = True
  354.     
  355.     '   //BitBlt to the hDC//
  356.     i_RetVal = LoadDLLIcon(sz_DLLPath, sz_ResName, c.hWnd, c.hDC)
  357.     
  358.     '   //Assign the picture property from the hDC//
  359.     c.Picture = c.Image
  360.     
  361.     '   //Restore the original setting//
  362.     c.AutoRedraw = i_Store
  363. End If
  364.  
  365.  
  366. End Sub
  367.  
  368. Sub LoadAPicture (c As Control, sz_DLLPath As String, sz_ResName As String, i_Stretch As Integer)
  369.  
  370. '   /* Modified Sunday 30 April 1995 [GB] */
  371.  
  372. If TypeOf c Is PictureBox Then
  373.     '   //Store the current Autoredraw setting//
  374.     Dim i_Store As Integer
  375.     i_Store = c.AutoRedraw
  376.     
  377.     '   //Enable the background hDC//
  378.     c.AutoRedraw = True
  379.     
  380.     '   //BitBlt to the hDC//
  381.     i_RetVal = LoadDLLBitMap(sz_DLLPath, sz_ResName, c.hWnd, c.hDC, i_Stretch)
  382.     
  383.     '   //Assign the picture property from the hDC//
  384.     c.Picture = c.Image
  385.     
  386.     '   //Restore the original setting//
  387.     c.AutoRedraw = i_Store
  388. End If
  389.  
  390. End Sub
  391.  
  392.