DECLARE FUNCTION CreateRoundRectRgn LIB "gdi32"ALIAS "CreateRoundRectRgn" (X1 AS LONG, Y1 AS LONG, X2 AS LONG, Y2 AS LONG, X3 AS LONG, Y3 AS LONG) AS LONG
DECLARE FUNCTION SetWindowRgn LIB "user32" ALIAS "SetWindowRgn" (hwnd AS LONG, hRgn AS LONG, bRedraw AS LONG) AS LONG
DECLARE FUNCTION DeleteObject LIB "gdi32" ALIAS "DeleteObject" (hObject AS LONG) AS LONG
TYPE QrPanel EXTENDS QPANEL
RndX AS LONG
RndY AS LONG
rBorder AS BYTE PROPERTY SET Paint
PROPERTY SET paint(flag AS BYTE)
DIM QpRegion AS LONG
WITH this
.rBorder = flag
IF flag>0 THEN
QpRegion = CreateRoundRectRgn(0,0,.Width,.Height,.RndX,.RndY)
SetWindowRgn .handle, QpRegion, True
END IF
END WITH
END PROPERTY
CONSTRUCTOR
RndX=20
RndY=20
Width = 100
Height = 100
rBorder = 0
END CONSTRUCTOR
END TYPE
|