📄 group__text__output__fns.htm
字号:
rc3.<a class="code" href="struct__RECT.htm#o0">left</a> = 0; rc3.<a class="code" href="struct__RECT.htm#o1">top</a> = 361; rc3.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc3.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 451; rc4.<a class="code" href="struct__RECT.htm#o0">left</a> = 0; rc4.<a class="code" href="struct__RECT.htm#o1">top</a> = 461; rc4.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc4.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 551; <a class="code" href="group__dc__attrs.htm#ga28">SetBkColor</a> (hdc, <a class="code" href="group__color__vars.htm#ga36">COLOR_lightwhite</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc1.<a class="code" href="struct__RECT.htm#o0">left</a>, rc1.<a class="code" href="struct__RECT.htm#o1">top</a>, rc1.<a class="code" href="struct__RECT.htm#o2">right</a>, rc1.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc2.<a class="code" href="struct__RECT.htm#o0">left</a>, rc2.<a class="code" href="struct__RECT.htm#o1">top</a>, rc2.<a class="code" href="struct__RECT.htm#o2">right</a>, rc2.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc3.<a class="code" href="struct__RECT.htm#o0">left</a>, rc3.<a class="code" href="struct__RECT.htm#o1">top</a>, rc3.<a class="code" href="struct__RECT.htm#o2">right</a>, rc3.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__draw__fns.htm#ga34">Rectangle</a> (hdc, rc4.<a class="code" href="struct__RECT.htm#o0">left</a>, rc4.<a class="code" href="struct__RECT.htm#o1">top</a>, rc4.<a class="code" href="struct__RECT.htm#o2">right</a>, rc4.<a class="code" href="struct__RECT.htm#o3">bottom</a>); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc1, -1, -1); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc2, -1, -1); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc3, -1, -1); <a class="code" href="group__rect__fns.htm#ga4">InflateRect</a> (&rc4, -1, -1); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb12); <a class="code" href="group__text__output__fns.htm#ga35">DrawText</a> (hdc, szBuff1, -1, &rc1, DT_NOCLIP | DT_CENTER | DT_WORDBREAK); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb16); <a class="code" href="group__text__output__fns.htm#ga35">DrawText</a> (hdc, szBuff2, -1, &rc2, DT_NOCLIP | DT_RIGHT | DT_WORDBREAK); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb24); <a class="code" href="group__text__output__fns.htm#ga35">DrawText</a> (hdc, szBuff3, -1, &rc3, DT_NOCLIP | DT_SINGLELINE | DT_CENTER | DT_VCENTER); <a class="code" href="group__font__fns.htm#ga19">SelectFont</a> (hdc, logfontgb16); <a class="code" href="group__text__output__fns.htm#ga36">DrawTextEx</a> (hdc, szBuff4, -1, &rc4, 32, DT_NOCLIP | DT_LEFT | DT_WORDBREAK);}</pre></div> </td> </tr></table><a class="anchor" name="ga1" doxytag="gdi.h::GetFontHeight"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int GUIAPI GetFontHeight </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname1" valign="top" nowrap> <em>hdc</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrieves the height of the current logical font in a DC. <p>This function retrieves the height of the current logical font in the DC <em>hdc</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hdc</em> </td><td>The device context. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The height of the current logical font.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga2">GetMaxFontWidth</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga9" doxytag="gdi.h::GetLastTextOutPos"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void GUIAPI GetLastTextOutPos </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname" nowrap> <em>hdc</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__POINT.htm">POINT</a> * </td> <td class="mdname" nowrap> <em>pt</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrieves the last text output position. <p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hdc</em> </td><td>The device context. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pt</em> </td><td>The last text output position will be returned through this pointer. </td></tr> </table></dl> </td> </tr></table><a class="anchor" name="ga2" doxytag="gdi.h::GetMaxFontWidth"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int GUIAPI GetMaxFontWidth </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname1" valign="top" nowrap> <em>hdc</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrieves the maximal character width of the current logical font in a DC. <p>This function retrieves the maximal character width of the current logical font in the DC <em>hdc</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hdc</em> </td><td>The device context. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The maximal character width of the current logical font.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga1">GetFontHeight</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga4" doxytag="gdi.h::GetTabbedTextExtent"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void GUIAPI GetTabbedTextExtent </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname" nowrap> <em>hdc</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>spText</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>len</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__SIZE.htm">SIZE</a> * </td> <td class="mdname" nowrap> <em>pSize</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Computes the output extent of a formatted text. <p>This function computes the output extent of the formatted text (<em>spText</em>) with length of <em>len</em>. This function returns the extent in a SIZE struct pointed to by <em>pSize</em> 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.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hdc</em> </td><td>The device context. </td></tr> <tr><td valign="top"></td><td valign="top"><em>spText</em> </td><td>The pointer to the string of text. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>The length of the text. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pSize</em> </td><td>The output extent will be returned through this buffer.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga3">GetTextExtent</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga3" doxytag="gdi.h::GetTextExtent"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void GUIAPI GetTextExtent </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname" nowrap> <em>hdc</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>spText</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>len</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__SIZE.htm">SIZE</a> * </td> <td class="mdname" nowrap> <em>pSize</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Computes the output extent of a string of text. <p>This function computes the output extent of the text (<em>spText</em>) with length of <em>len</em>. This function returns the extent in a SIZE struct pointed to by <em>pSize</em> and the width of text as the return value.<p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>hdc</em> </td><td>The device context. </td></tr> <tr><td valign="top"></td><td valign="top"><em>spText</em> </td><td>The pointer to the string of text. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>The length of the text. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pSize</em> </td><td>The output extent will be returned through this buffer.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga4">GetTabbedTextExtent</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga8" doxytag="gdi.h::TabbedTextOutEx"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">int GUIAPI TabbedTextOutEx </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a> </td> <td class="mdname" nowrap> <em>hdc</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>x</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -