
help...create polygon region API
Quote:
>can anyone tell me how to set the 'array of point(vertex)' in the
>'createpolygonrgn' api function? I just want to create a rhombus with
>coordinate: (0,50),(50,0),(50,100),(100,50)
Declare a structure (UDT) of type POINTAPI:
Type POINTAPI
x as Long
y as Long
End Type
Dim an array of type POINTAPI and fill the array members with your values:
Dim p(1 to 4) As POINTAPI
p(1).x = 0
p(1).y = 50
p(2).x = 50
p(2).y = 0
etc...
In the call to CreatePolygonRgn, use the first array member, p(1), as the
argument:
lRet = CreatePolygonRgn(p(1), 4, lFillMode)
Lee Weiner
weiner AT fuse DOT net