The following methods load and release bitmaps.
>>-aDialogControl~LoadBitmap(--bmpFilename--+-------------+--)->< +-,--"USEPAL"-+
The LoadBitmap method loads a bitmap from a file into memory and returns the handle to the bitmap.
The arguments are:
The name of a bitmap file. The name can also include a relative or absolute path.
Sets the color palette of the bitmap as the system color palette.
The following example loads into memory the bitmap file, Walker.bmp, which is located in the BMP subdirectory. hBmp is the handle to this in-memory bitmap.
hBmp = MyDialog~LoadBitmap("bmp\Walker.bmp", "USEPAL")
Note: Do not forget to call the RemoveBitmap method to free memory when the bitmap is no longer in use. You have to specify the INMEMORY option when using the ConnectBitmapButton or ChangeBitmapButton method.
>>-aDialogControl~RemoveBitmap(--hBitmap--)--------------------><
The RemoveBitmap method frees an in-memory bitmap that was loaded by LoadBitmap.
The only argument is:
The bitmap handle.