SETBUTTONRGN

Top  Previous  Next

Syntax

SETBUTTONRGN(win as window,id as int,hrgn as UINT)

Description

.Sets the display region used by a button of type @RGNBUTTON

Parameters

win - WINDOW or DIALOG parent of control

id - Controls identifier

hrgn - Handle to a region created by RGNFROMBITMAP.

Return value

None

Remarks

The region passed to this command becomes the property of the control.  No further action should be done with the regions handle.  If you wish to share a region between multiple control used the COPYRGN command.

Example usage

hrgn = RGNFROMBITMAP(GETSTARTPATH+"rgn_bmp1.bmp")
SETCONTROLCOLOR d1,BUTTON_1,RGB(255,255,255),RGB(10,100,128)
SETBUTTONRGN d1,BUTTON_1,COPYRGN(hrgn)
SETHTCOLOR d1,BUTTON_1,RGB(20,138,138)
SETBUTTONBORDER d1,BUTTON_1,0