⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__text__output__fns.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 4 页
字号:
          <td class="md" nowrap valign="top">hdc,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>extra&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;SetDCAttr (hdc, DC_ATTR_BLINE_EXTRA, (<a class="el" href="group__win32__types.htm#ga4">DWORD</a>) extra)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Sets the spacing bellow line for the DC and returns the old value. <p><dl compact><dt><b>Note:</b></dt><dd>Defined as a macro calling <em>SetDCAttr</em> for _USE_NEWGAL. If _USE_NEWGAL is not defined, <em>SetTextBellowLineExtra</em> is defined as a function, and have the same semantics as this macro.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga13">GetTextBellowLineExtra</a> </dd></dl><p>Definition at line <a class="el" href="gdi_8h-source.htm#l06750">6750</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><a class="anchor" name="ga14" doxytag="gdi.h::SetTextCharacterExtra"></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">#define SetTextCharacterExtra          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">hdc,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>extra&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;SetDCAttr (hdc, DC_ATTR_CHAR_EXTRA, (<a class="el" href="group__win32__types.htm#ga4">DWORD</a>) extra)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Sets the intercharacter spacing for the DC and returns the old spacing value. <p><dl compact><dt><b>Note:</b></dt><dd>Defined as a macro calling <em>SetDCAttr</em> for _USE_NEWGAL. If _USE_NEWGAL is not defined, <em>SetTextCharacterExtra</em> is defined as a function, and have the same semantics as this macro.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga11">GetTextCharacterExtra</a> </dd></dl><p>Definition at line <a class="el" href="gdi_8h-source.htm#l06724">6724</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><a class="anchor" name="ga18" doxytag="gdi.h::TabbedTextOut"></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">#define TabbedTextOut          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">hdc,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>x,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>y,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>text&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;TabbedTextOutLen (hdc, x, y, text, -1)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Outputs formatted text. <p>Defined as a macro calling <em>TabbedTextOutLen</em> passing <em>len</em> as -1.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga5">TextOutLen</a> </dd></dl><p>Definition at line <a class="el" href="gdi_8h-source.htm#l06891">6891</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><a class="anchor" name="ga17" doxytag="gdi.h::TextOut"></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">#define TextOut          </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">hdc,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>x,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>y,         <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>text&nbsp;</td>          <td class="mdname1" valign="top" nowrap>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap>&nbsp;&nbsp;&nbsp;TextOutLen (hdc, x, y, text, -1)</td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Outputs text. <p>Defined as a macro calling <em>TextOutLen</em> passing <em>len</em> as -1.<p><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga5">TextOutLen</a> </dd></dl><p>Definition at line <a class="el" href="gdi_8h-source.htm#l06881">6881</a> of file <a class="el" href="gdi_8h-source.htm">gdi.h</a>.    </td>  </tr></table><hr><h2>Typedef Documentation</h2><a class="anchor" name="ga0" doxytag="gdi.h::DTFIRSTLINE"></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">typedef struct <a class="el" href="struct__DTFIRSTLINE.htm">_DTFIRSTLINE</a>  <a class="el" href="struct__DTFIRSTLINE.htm">DTFIRSTLINE</a>          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>First line information of DrawTextEx2     </td>  </tr></table><hr><h2>Function Documentation</h2><a class="anchor" name="ga10" doxytag="gdi.h::DrawTextEx2"></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 DrawTextEx2           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga2">HDC</a>&nbsp;</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 *&nbsp;</td>          <td class="mdname" nowrap> <em>pText</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>nCount</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="struct__RECT.htm">RECT</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>pRect</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>int&nbsp;</td>          <td class="mdname" nowrap> <em>nIndent</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="group__win32__types.htm#ga6">UINT</a>&nbsp;</td>          <td class="mdname" nowrap> <em>nFormat</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap><a class="el" href="struct__DTFIRSTLINE.htm">DTFIRSTLINE</a> *&nbsp;</td>          <td class="mdname" nowrap> <em>firstline</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Draws a formatted text in a rectangle. <p>This function draws formatted text (<em>pText</em>) in the specified rectangle (<em>pRect</em>). It formats the text according to the specified method (through <em>nFormat</em>, including expanding tabs, justifying characters, breaking lines, and so forth).<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>&nbsp;</td><td>The device context. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pText</em>&nbsp;</td><td>The formatted text. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>nCount</em>&nbsp;</td><td>The length of the text. If it is less than 0, MiniGUI will treat it as a null-terminated string. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pRect</em>&nbsp;</td><td>The output rectangle. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>nIndent</em>&nbsp;</td><td>The indent value of the first line. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>nFormat</em>&nbsp;</td><td>The methods used to format the text. MiniGUI support the following method to format text so far:</td></tr>  </table></dl><ul><li>DT_TOP<br> Top-justifies text (single line only).</li><li>DT_LEFT<br> Aligns text to the left.</li><li>DT_CENTER<br> Centers text horizontally in the rectangle.</li><li>DT_RIGHT<br> Aligns text to the right.</li><li>DT_VCENTER<br> Centers text vertically (single line only).</li><li>DT_BOTTOM<br> Justify the text to the bottom of the rectangle. This value must be combined with DT_SINGLELINE.</li><li>DT_WORDBREAK<br> Break words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the the pRect parameter. A carriage return or linefeed also breaks the line.</li><li>DT_CHARBREAK<br> Break characters. Lines are automatically broken between characters if a character would extend past the edge of the rectangle specified by the the pRect parameter. A carriage return or linefeed also breaks the line. DT_CHARBREAK will override DT_WORDBREAK.</li><li>DT_SINGLELINE<br> Display text on the single line only. Carriage returns and linefeeds do not break the line.</li><li>DT_EXPANDTABS<br> Expands tab characters. The default number of character per tab is eight.</li><li>DT_TABSTOP<br> Set tab stops. Bits 15-8 (high-order byte of the low-order word) of the <em>uForma</em> parameter specify the number of characters for each tab. The default number of characters per tab is eight.</li><li>DT_NOCLIP<br> Draws without clipping. <em>DrawText</em> is somewhat faster when DT_NOCLIP is used.</li><li>DT_CALCRECT<br> Determines the width and the height of the rectangle. If there are multiple lines of text, <em>DrawText</em> uses the width of the rectangle pointed to by the <em>lpRect</em> parameter and extends the base of the rectangle to bound the last line of text. If there is only one line of text, <em>DrawText</em> modifies the right side of the rectangle so that it bounds the last character in the line. In either case, <em>DrawText</em> returns the height of the formatted text but does not draw the text.</li></ul><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>firstline</em>&nbsp;</td><td>If not null, DrawTextEx2 will only calculate the first line will be output in the rectangle, and return the number of the characters and the output width.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The output height of the formatted text.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__output__fns.htm#ga35">DrawText</a></dd></dl>Example:<p><div class="fragment"><pre class="fragment"><span class="keywordtype">void</span> OnModeDrawText (<a class="code" href="group__handles.htm#ga2">HDC</a> hdc){    <a class="code" href="struct__RECT.htm">RECT</a> rc1, rc2, rc3, rc4;    <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff1 = <span class="stringliteral">"This is a good day. \n"</span>            <span class="stringliteral">"This text is drawn by calling DrawText."</span>;    <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff2 = <span class="stringliteral">"This is a good day. \n"</span>            <span class="stringliteral">"This text is drawn by calling DrawText."</span>;    <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff3 = <span class="stringliteral">"Single line text, center."</span>;    <span class="keyword">const</span> <span class="keywordtype">char</span>* szBuff4 =             <span class="stringliteral">"This text is drawn by calling DrawText."</span>;    rc1.<a class="code" href="struct__RECT.htm#o0">left</a> = 1; rc1.<a class="code" href="struct__RECT.htm#o1">top</a>  = 1; rc1.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc1.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 101;    rc2.<a class="code" href="struct__RECT.htm#o0">left</a> = 0; rc2.<a class="code" href="struct__RECT.htm#o1">top</a>  = 110; rc2.<a class="code" href="struct__RECT.htm#o2">right</a> = 401; rc2.<a class="code" href="struct__RECT.htm#o3">bottom</a> = 351;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -