Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>drawtext()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DrawText()
Output a character string in a rectangular area
------------------------------------------------------------------------------

Syntax
DrawText( <hDC>, <cStr>, [ <aRect> ] , [ <nFlags> ] )   -->  nHeight

Arguments
<hDC> specifies the device context for a printer or a window.

<cStr> is the string to be output.  A carriage-return
character (chr(13)), optionally followed by a line-feed
(chr(10)), can be used to move to the next line.

<aRect> is an optional parameter that specifies the rectangle
in which output is to be done.  The default is the entire
client area, or all of the paper (for a printer).  If this
parameter is specified it should be an array with four
elements, giving the left, top, right and bottom positions of
the drawing area.

<nFlags> is an optional numeric parameter, specifying how
drawing should be done (use the DT_* values defined in
WINDOWS.CH).  By default, tabs are expanded (width 8),
external leading is included in the font height, and wrapping
is done at word breaks.

Returns
The height of the text drawn is returned.

Description
This function can be used instead of QOUT(), QQOUT() etc. to
output a character string to a window or to a printer.  It is
similar to the TextOut() function, but often more useful.

Example
#define   CR   chr( 13 )
DrawText( hDC, "Just Testing" + CR + "This is line 2" )


See Also: GetDC() GetPrintDC() TextOut()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson