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

📄 group__ctrl__listbox__msgs.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<!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 listbox 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&nbsp;Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.htm">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File&nbsp;List</a> | <a class="qindex" href="functions.htm">Data&nbsp;Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related&nbsp;Pages</a></div><h1>Messages of listbox control<br><small>[<a class="el" href="group__ctrl__listbox.htm">ListBox control</a>]</small></h1><h2>Defines</h2><ul><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga0">LB_ADDSTRING</a>&nbsp;&nbsp;&nbsp;0xF180<dl class="el"><dd class="mdescRight">Appends the specified string.  <a href="#ga0"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga1">LB_INSERTSTRING</a>&nbsp;&nbsp;&nbsp;0xF181<dl class="el"><dd class="mdescRight">Inserts an item to the list box.  <a href="#ga1"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga2">LB_DELETESTRING</a>&nbsp;&nbsp;&nbsp;0xF182<dl class="el"><dd class="mdescRight">Removes an item from the list box.  <a href="#ga2"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga4">LB_RESETCONTENT</a>&nbsp;&nbsp;&nbsp;0xF184<dl class="el"><dd class="mdescRight">Removes the contents of a list box.  <a href="#ga4"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga5">LB_GETSEL</a>&nbsp;&nbsp;&nbsp;0xF187<dl class="el"><dd class="mdescRight">Gets the selected state for an specified item.  <a href="#ga5"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga6">LB_SETSEL</a>&nbsp;&nbsp;&nbsp;0xF185<dl class="el"><dd class="mdescRight">Selects an item in a multiple-selection list box.  <a href="#ga6"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga7">LB_GETCURSEL</a>&nbsp;&nbsp;&nbsp;0xF188<dl class="el"><dd class="mdescRight">Gets the index of the currently selected or highlighted item.  <a href="#ga7"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga8">LB_SETCURSEL</a>&nbsp;&nbsp;&nbsp;0xF186<dl class="el"><dd class="mdescRight">Selects an item.  <a href="#ga8"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga9">LB_GETTEXT</a>&nbsp;&nbsp;&nbsp;0xF189<dl class="el"><dd class="mdescRight">Retrieves the text of an item in list box.  <a href="#ga9"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga10">LB_GETTEXTLEN</a>&nbsp;&nbsp;&nbsp;0xF18A<dl class="el"><dd class="mdescRight">Gets the length of text of item specified in a list box.  <a href="#ga10"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga11">LB_GETCOUNT</a>&nbsp;&nbsp;&nbsp;0xF18B<dl class="el"><dd class="mdescRight">Gets the number of items in the list box.  <a href="#ga11"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga14">LB_GETTOPINDEX</a>&nbsp;&nbsp;&nbsp;0xF18E<dl class="el"><dd class="mdescRight">Gets the index to the first visible item in the list box.  <a href="#ga14"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga15">LB_FINDSTRING</a>&nbsp;&nbsp;&nbsp;0xF18F<dl class="el"><dd class="mdescRight">Searchs a specified string.  <a href="#ga15"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga16">LB_GETSELCOUNT</a>&nbsp;&nbsp;&nbsp;0xF190<dl class="el"><dd class="mdescRight">Gets the number of selected items in a multiple-selection list box.  <a href="#ga16"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga17">LB_GETSELITEMS</a>&nbsp;&nbsp;&nbsp;0xF191<dl class="el"><dd class="mdescRight">Gets the numbers of selected items.  <a href="#ga17"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga23">LB_SETTOPINDEX</a>&nbsp;&nbsp;&nbsp;0xF197<dl class="el"><dd class="mdescRight">Ensures that a particular item in it is visible.  <a href="#ga23"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga24">LB_GETITEMRECT</a>&nbsp;&nbsp;&nbsp;0xF198<dl class="el"><dd class="mdescRight">Retrieves the dimensions of the rectangle.  <a href="#ga24"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga25">LB_GETITEMDATA</a>&nbsp;&nbsp;&nbsp;0xF199<dl class="el"><dd class="mdescRight">Gets item data in a list box if the box has LBS_CHECKBOX and/or LBS_USEICON styles.  <a href="#ga25"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga26">LB_SETITEMDATA</a>&nbsp;&nbsp;&nbsp;0xF19A<dl class="el"><dd class="mdescRight">Sets item data in a list box if the box has LBS_CHECKBOX and/or LBS_USEICON styles.  <a href="#ga26"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga30">LB_SETCARETINDEX</a>&nbsp;&nbsp;&nbsp;0xF19E<dl class="el"><dd class="mdescRight">Sets the focus rectangle to the item at the specified index.  <a href="#ga30"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga31">LB_GETCARETINDEX</a>&nbsp;&nbsp;&nbsp;0xF19F<dl class="el"><dd class="mdescRight">Determines the index of the item that has the focus rectangle.  <a href="#ga31"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga32">LB_SETITEMHEIGHT</a>&nbsp;&nbsp;&nbsp;0xF1A0<dl class="el"><dd class="mdescRight">Sets the height of all items.  <a href="#ga32"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga33">LB_GETITEMHEIGHT</a>&nbsp;&nbsp;&nbsp;0xF1A1<dl class="el"><dd class="mdescRight">Gets the height in pixels of an item specified in the wParam parameter.  <a href="#ga33"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga34">LB_FINDSTRINGEXACT</a>&nbsp;&nbsp;&nbsp;0xF1A2<dl class="el"><dd class="mdescRight">Searchs for an item that exactly matches the characters specified.  <a href="#ga34"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga40">LB_SETTEXT</a>&nbsp;&nbsp;&nbsp;0xF1AA<dl class="el"><dd class="mdescRight">Sets text of the specified item.  <a href="#ga40"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga41">LB_GETCHECKMARK</a>&nbsp;&nbsp;&nbsp;0xF1AB<dl class="el"><dd class="mdescRight">Gets check mark status of an item.  <a href="#ga41"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga42">LB_SETCHECKMARK</a>&nbsp;&nbsp;&nbsp;0xF1AC<dl class="el"><dd class="mdescRight">Sets check mark status of an item.  <a href="#ga42"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga43">LB_GETITEMADDDATA</a>&nbsp;&nbsp;&nbsp;0xF1AD<dl class="el"><dd class="mdescRight">Gets the 32-bit data value associated with an item.  <a href="#ga43"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga44">LB_SETITEMADDDATA</a>&nbsp;&nbsp;&nbsp;0xF1AE<dl class="el"><dd class="mdescRight">Associates a 32-bit data value with an item.  <a href="#ga44"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga45">LB_SETSTRCMPFUNC</a>&nbsp;&nbsp;&nbsp;0xF1AF<dl class="el"><dd class="mdescRight">Sets the STRCMP function used to sort items.  <a href="#ga45"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga46">LB_SETITEMDISABLE</a>&nbsp;&nbsp;&nbsp;0xF1B0<dl class="el"><dd class="mdescRight">Sets the item disable.  <a href="#ga46"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga47">LB_GETITEMDISABLE</a>&nbsp;&nbsp;&nbsp;0xF1B1<dl class="el"><dd class="mdescRight">Get the item disable status.  <a href="#ga47"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga48">LB_SETITEMBOLD</a>&nbsp;&nbsp;&nbsp;0xF1B2<dl class="el"><dd class="mdescRight">Sets the item display use bold font.  <a href="#ga48"></a><br></dl><li>#define <a class="el" href="group__ctrl__listbox__msgs.htm#ga49">LB_MULTIADDITEM</a>&nbsp;&nbsp;&nbsp;0xF1B3<dl class="el"><dd class="mdescRight">Appends the multi strings.  <a href="#ga49"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga0" doxytag="listbox.h::LB_ADDSTRING"></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 LB_ADDSTRING&nbsp;&nbsp;&nbsp;0xF180          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Appends the specified string. <p>An application sends an LB_ADDSTRING message to append an item specified in the lParam parameter to a list box.<p>For a text-only list box:<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga0">LB_ADDSTRING</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* text; wParam = 0; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)text;</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>text</em>&nbsp;</td><td>Pointer to the string of the item to be added.</td></tr>  </table></dl>For a list box with check box or icon (with LBS_CHECKBOX or LBS_USEICON styles):<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga0">LB_ADDSTRING</a> <a class="code" href="struct__LISTBOXITEMINFO.htm">PLISTBOXITEMINFO</a> plbii; wParam = 0; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)plbii;</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>plbii</em>&nbsp;</td><td>Pointer to the listbox item info to be added.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The index of the new item on success, else the one of the following error codes:</dd></dl><ul><li>LB_ERRSPACE No memory can be allocated for new item.</li><li>LB_ERR Invalid passed arguments. </li></ul><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00228">228</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga2" doxytag="listbox.h::LB_DELETESTRING"></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 LB_DELETESTRING&nbsp;&nbsp;&nbsp;0xF182          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Removes an item from the list box. <p>An application sends an LB_DELETESTRING message to a list box to remove from the list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga2">LB_DELETESTRING</a> <span class="keywordtype">int</span> del; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)del; 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>del</em>&nbsp;</td><td>The index of the listbox item to be deleted.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>LB_OKAY on success, else LB_ERR to indicate you passed an invalid index. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00294">294</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga15" doxytag="listbox.h::LB_FINDSTRING"></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 LB_FINDSTRING&nbsp;&nbsp;&nbsp;0xF18F          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Searchs a specified string. <p>An application sends an LB_FINDSTRING message to search a list box for an item that begins with the characters specified in the lParam parameter. The wParam parameter specifies the zero-based index of the item before the first item to be searched; The lParam parameter specifies a pointer to a null-terminated string that contains the prefix to search for.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga15">LB_FINDSTRING</a> <span class="keywordtype">int</span> index; <span class="keywordtype">char</span> *string; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)index; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)string;</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>index</em>&nbsp;</td><td>The index of the item to be searched. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>The string of the item to be searched.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The index of the matched item; LB_ERR for not found. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00523">523</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga34" doxytag="listbox.h::LB_FINDSTRINGEXACT"></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 LB_FINDSTRINGEXACT&nbsp;&nbsp;&nbsp;0xF1A2          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Searchs for an item that exactly matches the characters specified. <p>An application sends an LB_FINDSTRINGEXACT message to a list box to search it for an item that exactly matches the characters specified in the lParam parameter.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga34">LB_FINDSTRINGEXACT</a> <span class="keywordtype">int</span> index; <span class="keyword">const</span> <span class="keywordtype">char</span> *string; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)index; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)string;</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>index</em>&nbsp;</td><td>The index of the specified item. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>The string of the item to be searched for.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The index of the found item on success, else LB_ERR. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00779">779</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga31" doxytag="listbox.h::LB_GETCARETINDEX"></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 LB_GETCARETINDEX&nbsp;&nbsp;&nbsp;0xF19F          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Determines the index of the item that has the focus rectangle. <p>An application sends an LB_GETCARETINDEX message to a list box to determine the index of the item that has the focus rectangle in a multiple-selection list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga31">LB_GETCARETINDEX</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>The index of the item that has the focus rectangle. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00717">717</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga41" doxytag="listbox.h::LB_GETCHECKMARK"></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 LB_GETCHECKMARK&nbsp;&nbsp;&nbsp;0xF1AB          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets check mark status of an item. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga41">LB_GETCHECKMARK</a> <span class="keywordtype">int</span> index; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)index; 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>index</em>&nbsp;</td><td>The index of the specified item.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The check mark status of specified item on success; LB_ERR on error.</dd></dl>

⌨️ 快捷键说明

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