Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Win 2 API - <b>drawtext</b> draw formatted text http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DrawText             Draw Formatted Text

int DrawText(hDC, lpString, nCount, lpRect, wFormat)
HDC hDC;
LPSTR lpString;
int nCount; /* length of string or -1 if ASCIIZ string */
LPRECT lpRect; /* Rectangle to contain text */
WORD wFormat; /* One or more the following: */


  |--------------------------------------------------------------------|
  | DT_LEFT             Flush left                                     |
  | DT_CENTER           Centered                                       |
  | DT_RIGHT            Flush right                                    |
  | DT_TOP              Top justified (single line only)               |
  | DT_VCENTER          Vertically centered (single line only)         |
  | DT_BOTTOM           Bottom justified (single line only)            |
  | DT_WORDBREAK        Break lines at word boundaries                 |
  | DT_SINGLELINE       Single line /r/n doesn't break                 |
  | DT_EXPANDTABS       Expand tabs (default 8)                        |
  | DT_TABSTOP          Set tab stop as specified in HIBYTE of wFormat |
  | DT_NOCLIP           Don't clip                                     |
  | DT_EXTERNALLEADING  Include font's external leading in height      |
  | DT_CALCRECT         Calculate rectangle to contain text            |
  | DT_NOPREFIX         Don't process & as menomic                     |
  +--------------------------------------------------------------------+

Note:       Do not use the following with DT_TAPSTOP:

                DT_CALCRECT
                DT_EXTERNALLEADING
                DT_NOCLIP
                DT_NOPREFIX

Returns:    Height of text

See Also: TextOut

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