WinXDrawFilledEllipse


hElement = WinXDrawFilledEllipse (hWnd, hPen, hBrush, x1, y1, x2, y2)

Draws a filled ellipse (a circle is just a special kind of ellipse with both radii equal) on the specified window.

Parameter Description
hWnd The handle to the window to draw the ellipse on
hPen The handle to the pen to use to draw the ellipse with. 0 to use the same pen as the last drawing function. This is a standard GDI pen, you can create it with CreatePen or use a stock pen.
hBrush The handle to the brush to paint the inside of the ellipse with. 0 to use the same brush as the last drawing function. This is a standard GDI pen, you can create it using any of the GDI brush creation functions or use a stock brush.
x1 The x coordinate of the upper left hand corner
y1 The y coordinate of the upper left hand corner
x2 The x coordinate of the lower right hand corner
y2 The y coordinate of the lowe right hand corner

Returns

The id of the ellipse or -1 on fail

Remarks

The coordinate parameters specify a rectangle in which the ellipse will be drawn. If you register the onPaint callback, this function has no effect. This line 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 and a brush
hPen = CreatePen ($$PS_SOLID, 3, 0x00FF0000)
hBrush = CreateSolidBrush (0x000000FF)

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

Related Links

WinXDrawEllipse
onPaint (Callback)
WinXUpdate
WinXUndo