hElement = WinXDrawText (hWnd, hFont, STRING text, x, y, backCol, forCol)
Draws some text on the specified window using the specified font and colours
Parameter | Description |
---|---|
hWnd | The handle to the window to draw the text on |
hFont | The handle to the font to draw the text with |
STRING text | The text to draw |
x | The x coordinate where the upper left hand corner of the text will be drawn |
y | The y coordinate where the upper left hand corner of the text will be drawn |
backCol | The background colour for the text, -1 for none |
forCol | The foreground colour for the text |
The id of the text 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.
'First, get a logical font from the user 'Turn the logical font into a font object 'Now print some text |
WinXDraw_MakeLogFont
WinXDraw_GetFontDialog
WinXDraw_GetTextWidth