BCX_BMPBUTTON function

Purpose: BCX_BMPBUTTON creates a push button displaying a file based bitmap or, optionally, a resource based bitmap. BCX_BMPBUTTON will autosize the bitmap to the size of the button if the Width% and Height% parameters are both zero. Clicking on the button with a mouse will post a WM_COMMAND message to the owner window.


 Syntax:

 hCtl = BCX_BMPBUTTON(BitmapFile$, _
                        hWndParent, _
                            CtlID%, _
                             Xpos%, _
                             Ypos%, _
                            Width%, _
                           Height%  _
                            [,Res%] _
                       [,WinStyle%] _
                     [,ExWinStyle%])

 Parameters:

  • hCtl If the control was created, the return value is the handle to the new pushbutton control. If the function fails, the return value is NULL.
  • BitmapFile$File containing bitmap to be loaded on pushbutton if the bitmap is to be retrieved from a file. If the bitmap is to be retrieved from a resource then this parameter is NULL("").
  • hWndParent Handle to the window on which the button will be placed
  • CtlID% Reference integer corresponding to hCtl
  • Xpos% Horizontal placement of upper left corner of pushbutton
  • Ypos% Vertical placement of upper left corner of pushbutton
  • Width% Width of pushbutton. BCX_BMPBUTTON will autosize the bitmap to the size of the button if the Width% and Height% parameters are both zero.
  • Height% Height of pushbutton. BCX_BMPBUTTON will autosize the bitmap to the size of the button if the Width% and Height% parameters are both zero.
  • Res% is an OPTIONAL parameter containing an integer value to a bitmap resource. Res% is used if the bitmap file is to be retrieved from a resource.
  • WinStyle% [OPTIONAL] If the WinStyle% parameter is used, the default Window Style for a BCX_BMPBUTTON control, WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | WS_TABSTOP, is replaced with the value in WinStyle%. See your Win32 SDK or PSDK Reference help for more information about valid Window Styles.
  • ExWinStyle% [OPTIONAL] The default window Extended Window Style for a BCX_BMPBUTTON control is 0. See your Win32 SDK or PSDK Reference help for more information about valid Extended Window Styles.
Remarks: The default window Style for a BCX_BMPBUTTON control also can be changed by using the MODSTYLE function.