hElement = WinXDrawRect (hWnd, hPen, x1, y1, x2, y2)
Draws a rectangle
Parameter | Description |
---|---|
hWnd | The handle to the window to draw on |
hPen | The handle to the pen to draw with |
x1, y1 | The upper left corner of the rectangle |
x2, y2 | The lower right corner of the rectangle |
The id of the rectangle or -1 on error
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.
'create a pen hPen = CreatePen ($$PS_SOLID, 3, 0x00FF0000) 'Draw the rectangle WinXDrawRect(#hMain, hPen, 0, 0, 60, 60) |