SET_BCX_BMPBUTTON statement

Purpose: SET_BCX_BMPBUTTON complements the BCX_BMPBUTTON function by allowing a change to be made to the bitmap image of a BCX_BMPBUTTON after the button has been created.


 Syntax:

 SET_BCX_BMPBUTTON(hWnd, BitmapFile$ [, Res%])

 Parameters:

  • hWnd is a handle to a button that was created with BCX_BMPBUTTON.
  • BitmapFile$ specifies the file from which the bitmap will be retrieved. BitmapFile$ is set to 0 if the file is to be retrieved from a resource.
  • Res% is an OPTIONAL parameter containing an integer value to a bitmap. Res% is used if the bitmap file is to be retrieved from a resource.

Remarks: The subroutine has been written so that either a file based bitmap or a resource based bitmap can be passed to the subroutine. The default setting for the optional parameter Res% is 0 which means that the bitmap will be retrieved from the file specified in BitmapFile$. If the bitmap is to be retrieved from a resource then the integer value of the resource handle is passed in Res% and 0 is used as a parameter value for BitmapFile$.

To load a resource based bitmap


 SET_BCX_BMPBUTTON(ButtonHandle, 0, Res%)

To load a file based bitmap


 SET_BCX_BMPBUTTON(ButtonHandle, BitmapFile$)