Bitmap - %bm[bitmap_name]

In this section:

This is similar to the icon format %ic (Icon) (see Icon) but the picture is supplied as a simple bitmap. For example we could write:

i=winio@('This is a bitmap: %bm[tea_bitmap]')

and the resource script would include a line of the form:

tea_bitmap BITMAP "BT1.BMP"

The grave accent is used to specify that the bitmap is supplied via a handle rather than a name. A suitable handle is returned by make_bitmap@ or by the Windows API function LoadBitmap. If you want to use LoadBitmap to access one of the pre-defined bitmaps then you will need to create your own binding to LoadBitmap. For example:

  INTEGER(7) h_bitmap
  INTEGER OBM_DNARROW
  PARAMETER (OBM_DNARROW=Z'7FF0'L)
  STDCALL MyLoadBitmap 'LoadBitmapA' (VAL,VAL):INTEGER(7)
  h_bitmap=MyLoadBitmap(NULL,OBM_DNARROW)
  i=winio@('%`bm',h_bitmap)

A call-back function can be added to a bitmap by using the caret (^) format modifier.

The %im (Image) format is also available and works in the same way as %bm (Bitmap) except that it can be used with JPEG and PCX as well as BMP resources.

The %gi (GIF) format is also available and works in the same way as %bm except that it uses a GIF resource created from an image file stored in GIF format. GIF files are compressed and may be animated and/or partially transparent. They therefore make ideal eye-catching features.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited