COPYRGN

Top  Previous  Next

Syntax

UINT = COPYRGN(hrgn as UINT)

Description

Copies a Windows region

Parameters

hrgn - Handle to a Windows region.

Return value

A copy of the region

Remarks

A region should be deleted with DELETERGN 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

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