📄 group__ctrl__edit__msgs.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MiniGUI V1.6.10 API Reference: Messages of edit control</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical List</a> | <a class="qindex" href="annotated.htm">Data Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File List</a> | <a class="qindex" href="functions.htm">Data Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related Pages</a></div><h1>Messages of edit control<br><small>[<a class="el" href="group__ctrl__edit.htm">Edit/MEdit control</a>]</small></h1><h2>Data Structures</h2><ul><li>struct <a class="el" href="struct__TEXTPOSINFO.htm">_TEXTPOSINFO</a></ul><h2>Defines</h2><ul><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga2">EM_GETSEL</a> 0xF0B0<dl class="el"><dd class="mdescRight">Gets the selected string in the edit control. <a href="#ga2"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga3">EM_SETSEL</a> 0xF0B1<dl class="el"><dd class="mdescRight">Sets the selected point in the edit control and makes the text between insertion point and selection point selected. <a href="#ga3"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga4">EM_SETSELECTION</a> EM_SETSEL<li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga5">EM_SELECTALL</a> 0xF0B2<dl class="el"><dd class="mdescRight">Selects all the texts, the same meaning as ctrl+a. <a href="#ga5"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga6">EM_GETSELPOS</a> 0xF0B3<dl class="el"><dd class="mdescRight">Gets the position of the selection point. <a href="#ga6"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga7">EM_INSERTCBTEXT</a> 0xF0B4<dl class="el"><dd class="mdescRight">Inserts the text in the clipboard to the current caret position. <a href="#ga7"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga8">EM_COPYTOCB</a> 0xF0B5<dl class="el"><dd class="mdescRight">Copies the currently selected text to the clipboard. <a href="#ga8"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga9">EM_CUTTOCB</a> 0xF0B6<dl class="el"><dd class="mdescRight">Cuts the currently selected text to the clipboard. <a href="#ga9"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga10">EM_SETLFDISPCHAR</a> 0xF0B7<dl class="el"><dd class="mdescRight">Sets the char used to represent the line seperator. <a href="#ga10"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga11">EM_SETLINESEP</a> 0xF0B8<dl class="el"><dd class="mdescRight">Sets the line seperator. <a href="#ga11"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga12">EM_GETCARETPOS</a> 0xF0B9<dl class="el"><dd class="mdescRight">Gets the position of the caret. <a href="#ga12"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga13">EM_SETCARETPOS</a> 0xF0BA<dl class="el"><dd class="mdescRight">Sets the position of the caret. <a href="#ga13"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga14">EM_SETINSERTION</a> EM_SETCARETPOS<li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga15">EM_GETLINECOUNT</a> 0xF0BC<dl class="el"><dd class="mdescRight">Gets the line number. <a href="#ga15"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga16">EM_GETLINEHEIGHT</a> 0xF0BD<dl class="el"><dd class="mdescRight">Gets the height of a line. <a href="#ga16"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga17">EM_SETLINEHEIGHT</a> 0xF0BE<dl class="el"><dd class="mdescRight">Sets the height of a line. <a href="#ga17"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga19">EM_INSERTTEXT</a> 0xF0C0<dl class="el"><dd class="mdescRight">Inserts the specified text to the current caret position. <a href="#ga19"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga22">EM_GETMAXLIMIT</a> 0xF0C3<dl class="el"><dd class="mdescRight">Get text limit of a single-line edit control. <a href="#ga22"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga24">EM_LIMITTEXT</a> 0xF0C5<dl class="el"><dd class="mdescRight">Set text limit of an edit control. <a href="#ga24"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga25">EM_REDO</a> 0xF0C6<dl class="el"><dd class="mdescRight">Redo operation. <a href="#ga25"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga26">EM_UNDO</a> 0xF0C7<dl class="el"><dd class="mdescRight">Undo operation. <a href="#ga26"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga30">EM_SETPASSWORDCHAR</a> 0xF0CC<dl class="el"><dd class="mdescRight">Defines the character that edit control uses in conjunction with the ES_PASSWORD style. <a href="#ga30"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga33">EM_SETREADONLY</a> 0xF0CF<dl class="el"><dd class="mdescRight">Sets or removes the read-only style (ES_READONLY) in an edit control. <a href="#ga33"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga34">EM_SETDRAWSELECTFUNC</a> 0xF0D0<dl class="el"><dd class="mdescRight">Sets the callback function on drawing selected chars. <a href="#ga34"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga35">EM_SETGETCARETWIDTHFUNC</a> 0xF0D1<dl class="el"><dd class="mdescRight">Sets the callback function on getting caret width. <a href="#ga35"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga36">EM_GETPASSWORDCHAR</a> 0xF0D2<dl class="el"><dd class="mdescRight">Returns the character that edit controls uses in conjunction with the ES_PASSWORD style. <a href="#ga36"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga37">EM_SETLIMITTEXT</a> EM_LIMITTEXT<li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga38">ED_CARETSHAPE_LINE</a> 0<dl class="el"><dd class="mdescRight">Line-shaped caret. <a href="#ga38"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga39">ED_CARETSHAPE_BLOCK</a> 1<dl class="el"><dd class="mdescRight">Block-shaped caret. <a href="#ga39"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga40">EM_CHANGECARETSHAPE</a> 0xF0D3<dl class="el"><dd class="mdescRight">Changes the shape of the caret. <a href="#ga40"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga41">EM_REFRESHCARET</a> 0xF0D4<dl class="el"><dd class="mdescRight">Refresh caret of the edit control. <a href="#ga41"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga42">EM_ENABLECARET</a> 0xF0D5<dl class="el"><dd class="mdescRight">To enable or disable the input caret. <a href="#ga42"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga43">EM_GETLIMITTEXT</a> 0xF0D6<dl class="el"><dd class="mdescRight">Get text limit value of the edit control. <a href="#ga43"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga48">EM_SETTITLETEXT</a> 0xF0DC<dl class="el"><dd class="mdescRight">Sets the title text displayed before content text. <a href="#ga48"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga49">EM_GETTITLETEXT</a> 0xF0DD<dl class="el"><dd class="mdescRight">Gets the title text displayed before content text. <a href="#ga49"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga50">EM_SETTIPTEXT</a> 0xF0DE<dl class="el"><dd class="mdescRight">Sets the tip text displayed when content is empty. <a href="#ga50"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga51">EM_GETTIPTEXT</a> 0xF0DF<dl class="el"><dd class="mdescRight">Gets the tip text displayed when content is empty. <a href="#ga51"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga52">EM_GETNUMOFPARAGRAPHS</a> 0xF0E0<dl class="el"><dd class="mdescRight">Gets the number of paragraphs in textedit control. <a href="#ga52"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga53">EM_GETPARAGRAPHLENGTH</a> 0xF0E1<dl class="el"><dd class="mdescRight">Gets the specified paragraph length in textedit control. <a href="#ga53"></a><br></dl><li>#define <a class="el" href="group__ctrl__edit__msgs.htm#ga54">EM_GETPARAGRAPHTEXT</a> 0xF0E2<dl class="el"><dd class="mdescRight">Gets the specified paragraph text from textedit control. <a href="#ga54"></a><br></dl></ul><h2>Typedefs</h2><ul><li>typedef int(* <a class="el" href="group__ctrl__edit__msgs.htm#ga0">ED_DRAWSEL_FUNC</a> )(<a class="el" href="group__handles.htm#ga1">HWND</a>, <a class="el" href="group__handles.htm#ga2">HDC</a>, int, int, const char *, int, int)<dl class="el"><dd class="mdescRight">Type of the edit control callback function on drawing selected strings. <a href="#ga0"></a><br></dl><li>typedef <a class="el" href="struct__TEXTPOSINFO.htm">_TEXTPOSINFO</a> <a class="el" href="group__ctrl__edit__msgs.htm#ga1">TEXTPOSINFO</a></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga39" doxytag="edit.h::ED_CARETSHAPE_BLOCK"></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 ED_CARETSHAPE_BLOCK 1 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Block-shaped caret. <p><p>Definition at line <a class="el" href="edit_8h-source.htm#l00693">693</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga38" doxytag="edit.h::ED_CARETSHAPE_LINE"></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 ED_CARETSHAPE_LINE 0 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Line-shaped caret. <p><p>Definition at line <a class="el" href="edit_8h-source.htm#l00687">687</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga40" doxytag="edit.h::EM_CHANGECARETSHAPE"></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 EM_CHANGECARETSHAPE 0xF0D3 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Changes the shape of the caret. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__edit__msgs.htm#ga40">EM_CHANGECARETSHAPE</a> <span class="keywordtype">int</span> caret_shape; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)caret_shape; lParam = 0;</pre></div><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>caret_shape</em> </td><td>Shape index of the caret, can be ED_CARETSHAPE_LINE or ED_CARETSHAPE_BLOCK.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The old create shape </dd></dl><p>Definition at line <a class="el" href="edit_8h-source.htm#l00712">712</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga8" doxytag="edit.h::EM_COPYTOCB"></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 EM_COPYTOCB 0xF0B5 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Copies the currently selected text to the clipboard. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__edit__msgs.htm#ga8">EM_COPYTOCB</a> wParam = 0; lParam = 0</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>Length of the text which is really copied to clipboard. </dd></dl><p>Definition at line <a class="el" href="edit_8h-source.htm#l00308">308</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga9" doxytag="edit.h::EM_CUTTOCB"></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 EM_CUTTOCB 0xF0B6 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Cuts the currently selected text to the clipboard. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__edit__msgs.htm#ga9">EM_CUTTOCB</a> wParam = 0; lParam = 0</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>Length of the text which is really copied to clipboard. </dd></dl><p>Definition at line <a class="el" href="edit_8h-source.htm#l00323">323</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga42" doxytag="edit.h::EM_ENABLECARET"></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 EM_ENABLECARET 0xF0D5 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>To enable or disable the input caret. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__edit__msgs.htm#ga42">EM_ENABLECARET</a> <a class="code" href="group__simple__types.htm#ga0">BOOL</a> bEnable; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)bEnable; lParam = 0;</pre></div><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>bEnable</em> </td><td>TRUE to enable caret.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The previous caret enabled status. </dd></dl><p>Definition at line <a class="el" href="edit_8h-source.htm#l00737">737</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga12" doxytag="edit.h::EM_GETCARETPOS"></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 EM_GETCARETPOS 0xF0B9 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets the position of the caret. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__edit__msgs.htm#ga12">EM_GETCARETPOS</a> <span class="keywordtype">int</span>* line_pos; <span class="keywordtype">int</span>* char_pos; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)line_pos; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)char_pos;</pre></div><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>line_pos</em> </td><td>Pointer to a integer buffer to save the caret line position. For single line editor, it is always zero. Note : Here "line" means a text string ended with a line seperator, not a single text line in wrap mode. So, char_pos means the character position in a text string. </td></tr> <tr><td valign="top"></td><td valign="top"><em>char_pos</em> </td><td>Pointer to a integer buffer to save the caret character position.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The string length of the text from the beginning to the caret pos. </dd></dl><p>Definition at line <a class="el" href="edit_8h-source.htm#l00390">390</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga43" doxytag="edit.h::EM_GETLIMITTEXT"></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 EM_GETLIMITTEXT 0xF0D6 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get text limit value of the edit control. <p><dl compact><dt><b>Returns:</b></dt><dd>-1 when user doesn't set limit value, otherwise return current limit value. </dd></dl><p>Definition at line <a class="el" href="edit_8h-source.htm#l00746">746</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga15" doxytag="edit.h::EM_GETLINECOUNT"></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 EM_GETLINECOUNT 0xF0BC </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets the line number. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__edit__msgs.htm#ga15">EM_GETLINECOUNT</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>Line number on success, otherwise -1. </dd></dl><dl compact><dt><b>Note:</b></dt><dd>Implemented for TextEdit control. </dd></dl><p>Definition at line <a class="el" href="edit_8h-source.htm#l00440">440</a> of file <a class="el" href="edit_8h-source.htm">edit.h</a>. </td> </tr></table><a class="anchor" name="ga16" doxytag="edit.h::EM_GETLINEHEIGHT"></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 EM_GETLINEHEIGHT 0xF0BD </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -