hElement = WinXDrawFilledRect (hWnd, hPen, hBrush, x1, y1, x2, y2)
Draws a filled rectangle on the specified window.
Parameter | Description |
---|---|
hWnd | The hanlde to the window to draw the rectangle on |
hPen | The handle to the pen to use to draw the rectangle 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 rectangle 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 lower right hand corner |
The id of the rectangle or -1 on fail.
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 and a brush hPen = CreatePen ($$PS_SOLID, 3, 0x00FF0000) hBrush = CreateSolidBrush (0x000000FF) 'Draw the rectangle WinXDrawFilledRect(#hMain, hPen, hBrush, 0, 0, 60, 60) |