SETBUTTONBITMAPS

Top  Previous  Next

Syntax

SETBUTTONBITMAPS(win as window,id as int,hNormal as UINT,hHot as UINT,hSelected as UINT)

Description

Sets the bitmaps used by a @RGNBUTTON.

Parameters

hNormal - Bitmap displayed as default by the button.

hHot - Bitmap displayed during hot tracking of the button.

hSelected - Reserved for future use, should be NULL

Return value

None

Remarks

The bitmaps should be created the same dimensions as the button control.  This command should only be used on a @RGNBUTTON control or you may have resource leaks.

Once the bitmaps are set the control owns the handles and will free them automatically when the button control is destroyed.

Example usage

SETCONTROLCOLOR d1,BUTTON_4,RGB(200,200,200),RGB(10,100,128)
SETBUTTONBITMAPS d1,BUTTON_4,LOADIMAGE(GETSTARTPATH+"button_bmp_normal2.bmp",@IMGBITMAP),_
LOADIMAGE(GETSTARTPATH+"button_bmp_hot2.bmp",@IMGBITMAP),0