Hiya,
I'm trying to draw filled polygons on a form and I'm trying to use the GDI32.DLL API to do it.
My code is pretty straight forward;
where:
arrAPIPoints is an array of type POINTAPI containing the x.y coords of my polygon
arrAPINumPoints is an array of type LONG containing a single element stating the number of points in arrAPIPoints
According to lngRC, PolyPolygon(...) isn't throwing an error, but nothing appears on my form
So what am I doing wrong?
Any help will be much appreciated,
Thanks,
Paul
I'm trying to draw filled polygons on a form and I'm trying to use the GDI32.DLL API to do it.
My code is pretty straight forward;
Code:
[COLOR=#00007f]Private Declare Function [COLOR=#000000]PolyPolygon[/color] Lib [COLOR=#000000]"gdi32.dll"[/color] (ByVal [COLOR=#000000]hdc[/color] As Long, [COLOR=#000000]lpPoint[/color] As POINTAPI, [COLOR=#000000]lpPolyCounts[/color] As long, ByVal [COLOR=#000000]nCount[/color] As Long) As Long
Private Declare Function [COLOR=#000000]CreateSolidBrush[/color] Lib [COLOR=#000000]"gdi32.dll"[/color] (ByVal [COLOR=#000000]crColor[/color] As Long) As Long
Private Type [COLOR=#000000]POINTAPI[/color]
[COLOR=#000000]x[/color] As Long
[COLOR=#000000]y[/color] As Long
End Type
[COLOR=#000000]hBrush[/color] = CreateSolidBrush(RGB([COLOR=#000000]127,127,255[/color]))
[COLOR=#000000]lngRC[/color] = PolyPolygon([COLOR=#000000]frmMain.hdc, arrAPIPoints(0), arrAPINumPoints(0), 1[/color])[/color]
where:
arrAPIPoints is an array of type POINTAPI containing the x.y coords of my polygon
arrAPINumPoints is an array of type LONG containing a single element stating the number of points in arrAPIPoints
According to lngRC, PolyPolygon(...) isn't throwing an error, but nothing appears on my form
So what am I doing wrong?
Any help will be much appreciated,
Thanks,
Paul