|
Public Member Functions |
| BOOL | ChooseFont (HWND hWnd) |
| | Displays the Windows font chooser dialog box.
|
| BOOL | DrawMonoSpacedText (HDC hDC, LPCTSTR pText, LPRECT pRect) |
| | Draws any font as monospaced.
|
| long | CalcTextWidth (HDC hDC, long *pWidth=NULL) |
| | Calculates the width of the specified text.
|
| long | CalcTextHeight (HDC hDC, long *pHeight=NULL) |
| | Calculates the height of the specified text.
|
| BOOL | CalcRect (HDC hDC, LPCTSTR pText, LPRECT pRect) |
| | Calculates the size of a text string.
|
| BOOL | GetFont (LPLOGFONT pFont) |
| | Gets a copy of the current font information.
|
| BOOL | SetFont (LPLOGFONT pFont) |
| | Sets the font.
|
|
void | Default () |
| | Sets default text attributes.
|
| BOOL | DrawText (HDC hDC, LPCTSTR pText, LPRECT pRect) |
| | Draws the specified text into a Device Context.
|
|
void | Destroy () |
| | Releases all resources allocated for this class.
|
| BOOL | SetFont (DWORD dwSize, LPCTSTR pFont) |
| | Sets a font by font name and size.
|
|
| CText () |
| | Constructor.
|
|
virtual | ~CText () |
| | Destructor.
|
| void | SetXMargin (long x) |
| | Sets the horizontal text margin.
|
| void | SetYMargin (long y) |
| | Sets vertical text margin.
|
| void | SetMargins (long x, long y) |
| | Sets the text margins.
|
| void | SetEscapement (int v=0) |
| | Sets the text rotation.
|
| void | SetWeight (int w=FW_NORMAL) |
| | Sets the text weight.
|
| void | SetItalic (BOOL b=FALSE) |
| | Enables / disables italic text.
|
| void | SetUnderline (BOOL b=FALSE) |
| | Enables / disables underlined text.
|
| void | SetStrikeOut (BOOL b=FALSE) |
| | Enables / disables striked out text.
|
| void | SetColor (COLORREF col=MAXDWORD) |
| | Sets the text color.
|
|
COLORREF | GetColor () |
| | Returns current text color.
|
| void | SetFlags (DWORD f=DT_CENTER|DT_VCENTER|DT_WORDBREAK|DT_NOCLIP|DT_SINGLELINE) |
| | Sets the text flags.
|
|
DWORD | GetFlags () |
| | Returns current text flags.
|
| void | CalcTextBox (HDC hDC) |
| | Calculates the size of a single text character.
|
| BOOL | SetMonoSpacedText (HDC hDC) |
| | Sets up for drawing mono-spaced font for any font type.
|
| void | SetMonoSpacedTextMetrics (long w, long h) |
| | Sets the width and height of a mono-spaced character.
|
| void | SetMonoSpacedTabs (DWORD t) |
| | Size of a mono spaced tab character.
|
|
DWORD | GetMonoTextWidth () |
| | Returns the mono-spaced width of a single character.
|
|
DWORD | GetMonoTextHeight () |
| | Returns the mono-spaced height of a single character.
|
|
| operator LPLOGFONT () |
| | Returns a pointer to the LOGFONT structure for the current font.
|
|
| operator HFONT () |
| | Returns the HFONT handle of the current font.
|
|
BOOL | IsFont () |
| | Returns non-zero if a font is loaded.
|
|
LPLOGFONT | GetLogFont () |
| | Returns a pointer to the LOGFONT structure for the current font.
|
Static Public Member Functions |
| static DWORD | WriteBuffer (LPSTR out, DWORD op, DWORD om, LPCTSTR buf, DWORD size) |
| | Provides generic buffer writing.
|
| static DWORD | HtmlText (LPSTR out, DWORD odw, LPCTSTR buf, DWORD size, BOOL bHyperLinks) |
| | Adds HTML escape sequences to text.
|
| static BOOL | ChooseFont (LPLOGFONT pFont, HWND hWnd=NULL, BOOL bInit=FALSE, COLORREF *pRGB=NULL) |
| | Displays Windows font chooser dialog box.
|