📄 group__text__parse__fns.htm
字号:
<td> </td> <td><p>Retrieves the length and info of the first multi-byte word in a string. <p>This function retrieves the information of the first multi-byte character in the string <em>mstr</em> which is <em>len</em> bytes long, and returns it through <em>word_info</em>. It also returns the full length of the word including the delimiters after the word.<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>log_font</em> </td><td>The logical font used to parse the multi-byte string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>mstr</em> </td><td>The multi-byte string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>The length of the string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>word_info</em> </td><td>The pointer to a WORDINFO structure used to return the word information.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The length of the first multi-byte word.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__parse__fns.htm#ga2">GetFirstMCharLen</a>, <a class="el" href="group__font__fns.htm#ga4">WORDINFO</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga9" doxytag="gdi.h::GetTabbedTextExtentPoint"></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 GetTabbedTextExtentPoint </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>text</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>int </td> <td class="mdname" nowrap> <em>max_extent</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>fit_chars</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>pos_chars</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>dx_chars</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>size</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 extent of a string when output the formatted string in a limited space. <p> </td> </tr></table><a class="anchor" name="ga8" doxytag="gdi.h::GetTextExtentPoint"></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 GetTextExtentPoint </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>text</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>int </td> <td class="mdname" nowrap> <em>max_extent</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>fit_chars</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>pos_chars</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>dx_chars</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>size</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 extent of a string when output the string in a limited space. <p>This function computes the extent of the specified string of text <em>text</em> which is <em>len</em> bytes long when output the text in a limited space (<em>max_extent</em> wide). If <em>pos_chars</em> and <em>dx_chars</em> are not NULL, this function will return the positions of each character in the text, and the output position of each character. This function returns the text extent in a SIZE struct pointed to by <em>size</em>, and the width of text as 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>text</em> </td><td>The multi-byte string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>The length of the string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>max_extent</em> </td><td>The width of the limited space. </td></tr> <tr><td valign="top"></td><td valign="top"><em>fit_chars</em> </td><td>The number of the characters actually outputed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pos_chars</em> </td><td>The positions of each character in the text will be returned through this pointer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>dx_chars</em> </td><td>The output positions of each character in the text will be returned through this pointer. </td></tr> <tr><td valign="top"></td><td valign="top"><em>size</em> </td><td>The output extent of the text in the limited space will be returned through this pointer.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of the characters which can be fit to the limited space.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__parse__fns.htm#ga2">GetFirstMCharLen</a>, <a class="el" href="group__text__parse__fns.htm#ga3">GetFirstWord</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga0" doxytag="gdi.h::GetTextMCharInfo"></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 GetTextMCharInfo </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> </td> <td class="mdname" nowrap> <em>log_font</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>mstr</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>int * </td> <td class="mdname" nowrap> <em>pos_chars</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 positions of multi-byte characters in a string. <p>This function retrieves position of multi-byte characters in the string <em>mstr</em> which is <em>len</em> bytes long. It returns the positions of characters in the string in an integer array pointed to by <em>pos_chars</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>log_font</em> </td><td>The logical font used to parse the multi-byte string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>mstr</em> </td><td>The multi-byte string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>len</em> </td><td>The length of the string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pos_chars</em> </td><td>The position of characters will be returned through this array if it is not NULL.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of characters in the multi-byte string.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__text__parse__fns.htm#ga1">GetTextWordInfo</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga1" doxytag="gdi.h::GetTextWordInfo"></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 GetTextWordInfo </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="struct__LOGFONT.htm">PLOGFONT</a> </td> <td class="mdname" nowrap> <em>log_font</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>mstr</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>int * </td> <td class="mdname" nowrap> <em>pos_words</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__WORDINFO.htm">WORDINFO</a> * </td> <td class="mdname" nowrap> <em>info_words</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 information of multi-byte words in a string. <p>This function retrieves information of multi-byte words in the string <em>mstr</em> which is <em>len</em> bytes long. It returns the positions of words in the string in an integer array pointed to by <em>pos_words</em> if the pointer is not NULL. This function also returns the information of words in a WORDINFO struct array pointed to by <em>info_words</em> when the pointer is not NULL.<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>log_font</em> </td><td>The logical font used to parse the multi-byte string. </td></tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -