SET_BCX_ICON statement

Purpose: SET_BCX_ICON inserts a file based icon or optionally a resource based icon on to a control.


 Syntax:

 SET_BCX_ICON(hWnd, IconFile$ _
                      [, Res%] _
                    [, Width%] _
                   [, Height%])

 Parameters:

  • hWnd is a handle to a control.
  • IconFile$ specifies the file from which the icon will be retrieved. IconFile$ is set to 0 if the file is to be retrieved from a resource.
  • Res% [OPTIONAL] parameter containing an integer value to an icon resource. Res% is used if the icon is to be retrieved from a resource.
  • Width% [OPTIONAL] sets the width of the displayed icon.
  • Height% [OPTIONAL] sets the height of the displayed icon.

Remarks: The subroutine has been written so that either a file based icon or a resource based icon can be passed to the subroutine. The default setting for the optional parameter Res% is 0 which means that the icon will be retrieved from the file specified in IconFile$. 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 an argument for the IconFile$ parameter.

To load a resource based icon


 SET_BCX_ICON(ControlHandle, 0, IconRes%)

To load a file based icon


 SET_BCX_ICON(ControlHandle, "BCX.ico")