|
|
Draws a formatted text in a rectangle. Defined as a macro calling DrawTextEx2 passing nIndent as 0 and firstline as NULL.
|
|
|
Draws a formatted text in a rectangle. Defined as a macro calling DrawTextEx2 passing firstline as NULL.
|
|
|
Retrives the current spacing above line for the DC.
|
|
|
Retrives the current spacing bellow line for the DC.
|
|
|
Retrives the current intercharacter spacing for the DC.
|
|
|
Sets the spacing above line for the DC and returns the old value.
|
|
|
Sets the spacing bellow line for the DC and returns the old value.
|
|
|
Sets the intercharacter spacing for the DC and returns the old spacing value.
|
|
|
Outputs formatted text. Defined as a macro calling TabbedTextOutLen passing len as -1.
|
|
|
Outputs text. Defined as a macro calling TextOutLen passing len as -1.
|
|
|
First line information of DrawTextEx2 |
|
||||||||||||||||||||||||||||||||
|
Draws a formatted text in a rectangle. This function draws formatted text (pText) in the specified rectangle (pRect). It formats the text according to the specified method (through nFormat, including expanding tabs, justifying characters, breaking lines, and so forth).
void OnModeDrawText (HDC hdc) { RECT rc1, rc2, rc3, rc4; const char* szBuff1 = "This is a good day. \n" "This text is drawn by calling DrawText."; const char* szBuff2 = "This is a good day. \n" "This text is drawn by calling DrawText."; const char* szBuff3 = "Single line text, center."; const char* szBuff4 = "This text is drawn by calling DrawText."; rc1.left = 1; rc1.top = 1; rc1.right = 401; rc1.bottom = 101; rc2.left = 0; rc2.top = 110; rc2.right = 401; rc2.bottom = 351; rc3.left = 0; rc3.top = 361; rc3.right = 401; rc3.bottom = 451; rc4.left = 0; rc4.top = 461; rc4.right = 401; rc4.bottom = 551; SetBkColor (hdc, COLOR_lightwhite); Rectangle (hdc, rc1.left, rc1.top, rc1.right, rc1.bottom); Rectangle (hdc, rc2.left, rc2.top, rc2.right, rc2.bottom); Rectangle (hdc, rc3.left, rc3.top, rc3.right, rc3.bottom); Rectangle (hdc, rc4.left, rc4.top, rc4.right, rc4.bottom); InflateRect (&rc1, -1, -1); InflateRect (&rc2, -1, -1); InflateRect (&rc3, -1, -1); InflateRect (&rc4, -1, -1); SelectFont (hdc, logfontgb12); DrawText (hdc, szBuff1, -1, &rc1, DT_NOCLIP | DT_CENTER | DT_WORDBREAK); SelectFont (hdc, logfontgb16); DrawText (hdc, szBuff2, -1, &rc2, DT_NOCLIP | DT_RIGHT | DT_WORDBREAK); SelectFont (hdc, logfontgb24); DrawText (hdc, szBuff3, -1, &rc3, DT_NOCLIP | DT_SINGLELINE | DT_CENTER | DT_VCENTER); SelectFont (hdc, logfontgb16); DrawTextEx (hdc, szBuff4, -1, &rc4, 32, DT_NOCLIP | DT_LEFT | DT_WORDBREAK); } |
|
|
Retrives the height of the current logical font in a DC. This function retrives the height of the current logical font in the DC hdc.
|
|
||||||||||||
|
Retrives the last text output position.
|
|
|
Retrives the maximal character width of the current logical font in a DC. This function retrives the maximal character width of the current logical font in the DC hdc.
|
|
||||||||||||||||||||
|
Computes the output extent of a formatted text. This function computes the output extent of the formatted text (spText) with length of len. This function returns the extent in a SIZE struct pointed to by pSize and the width of text as the return value. The output extent will be affected by the default tab size if there are some TAB characters in the text.
|
|
||||||||||||||||||||
|
Computes the output extent of a string of text. This function computes the output extent of the text (spText) with length of len. This function returns the extent in a SIZE struct pointed to by pSize and the width of text as the return value.
|
|
||||||||||||||||||||||||||||||||||||
|
Writes a character string at a specified location, expanding tabs to the values specified in an anrry of tab-stop positions. This function writes the string spText with length of nCount at a specified locations, expanding tabs to the value spcified in the array pTabPositions of tab-stop positions.
|
|
||||||||||||||||||||||||
|
Outputs a formatted text. This function outputs the formatted text spText with length of len at (x,y). This function returns the width of text. The output will be affected by the default tab size if there are some TAB characters in the text.
|
|
||||||||||||||||||||||||
|
Outputs a string of text. This function outputs the text spText with length of len at a (x,y). This function returns the width of text.
|
1.4.2