DELETERGN

Top  Previous  Next

Syntax

DELETERGN(hrgn as UINT)

Description

Deletes a region.

Parameters

hrgn - The region to be deleted.

Return value

None

Remarks

A region should be deleted if it is no longer in use.  Unless the region is passed to a button of type @RGNBUTTON in which case the button takes care of freeing the region when it is destroyed.

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
 
SETFONT d1,"Arial",14,800,0,BUTTON_2
SETCONTROLCOLOR d1,BUTTON_2,RGB(255,255,255),RGB(10,100,128)
SETBUTTONRGN d1,BUTTON_2,COPYRGN(hrgn)
SETBUTTONBITMAPS d1,BUTTON_2,LOADIMAGE(GETSTARTPATH+"button_bmp_normal.bmp",@IMGBITMAP),0,0
SETHTCOLOR d1,BUTTON_2,RGB(80,80,80)
 
DELETERGN(hrgn)