WinXDrawEllipse


hElement = WinXDrawEllipse (hWnd, hPen, x1, y1, x2, y2)

Draws an ellipse

Parameter Description
hWnd The handle to the window to draw on
hPen The pen to draw the ellipse with
x1, y1 Upper left corner of the ellipse bounding rect
x2, y2 Lower right corner of the ellipse bounding rect

Returns

The id of the ellipse or -1 on fail

Remarks

The coordinates specify the bounding rectangle in which the ellipse is rendered. If you register the onPaint callback, this function has no effect. The ellipse will not be visible untill you call the WinXUpdate function. You can use the id returned by this function to undo the ellipse with the WinXUndo function.

Examples

'create a pen
hPen = CreatePen ($$PS_SOLID, 3, 0x00FF0000)

'Draw the ellipse (or in this case, circle)
WinXDrawEllipse(#hMain, hPen, 0, 0, 60, 60)

Related Links

WinXDrawFilledEllipse
onPaint (Callback)
WinXUpdate
WinXUndo