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

📄 group__ctrl__listbox__msgs.htm

📁 MINIGUI1.6开发API
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<p>Gets the selected state for an specified item. <p>An application sends an LB_GETSEL message to a list box to get the selected state for an item specified in the wParam parameter.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga5">LB_GETSEL</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 state of the specified item:<ul><li>0<br> Not selected.</li><li>&gt;0<br> Selected.</li><li>LB_ERR<br> Invalid index. </li></ul></dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00338">338</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga16" doxytag="listbox.h::LB_GETSELCOUNT"></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_GETSELCOUNT&nbsp;&nbsp;&nbsp;0xF190          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the number of selected items in a multiple-selection list box. <p>An application sends an LB_GETSELCOUNT message to a list box to get the number of selected items in a multiple-selection list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga16">LB_GETSELCOUNT</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>The number of selected items in the multiple-selection listbox. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00541">541</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga17" doxytag="listbox.h::LB_GETSELITEMS"></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_GETSELITEMS&nbsp;&nbsp;&nbsp;0xF191          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the numbers of selected items. <p>An application sends an LB_GETSELITEMS message to a list box to fill a buffer with an array of integers that specify the item numbers of selected items in a multiple-selection list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga17">LB_GETSELITEMS</a> <span class="keywordtype">int</span> nItem; <span class="keywordtype">int</span> *pInt; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)nItem; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)pInt;</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>nItem</em>&nbsp;</td><td>The maximum integer numbers wanted. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>pInt</em>&nbsp;</td><td>The buffer of an array of integers to save the indices of selected items.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of selected items. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00565">565</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga9" doxytag="listbox.h::LB_GETTEXT"></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_GETTEXT&nbsp;&nbsp;&nbsp;0xF189          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Retrieves the text of an item in list box. <p>An application sends an LB_GETTEXT message to a list box to retrieve the text of an item.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga9">LB_GETTEXT</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 selected item. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>string</em>&nbsp;</td><td>Pointer to the string buffer. The buffer should be large enough to contain the text of the item.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>One of the following values:<ul><li>LB_OKAY<br> Success.</li><li>LB_ERR<br> Invalid item index.</li></ul></dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__ctrl__listbox__msgs.htm#ga10">LB_GETTEXTLEN</a> </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00436">436</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga10" doxytag="listbox.h::LB_GETTEXTLEN"></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_GETTEXTLEN&nbsp;&nbsp;&nbsp;0xF18A          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the length of text of item specified in a list box. <p>An application sends an LB_GETTEXTLEN message to a list box to get the length of text of the item specified in the <em>wParam</em> parameter.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga10">LB_GETTEXTLEN</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 length of the strings on success, else LB_ERR to indicate invalid index. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00457">457</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga14" doxytag="listbox.h::LB_GETTOPINDEX"></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_GETTOPINDEX&nbsp;&nbsp;&nbsp;0xF18E          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Gets the index to the first visible item in the list box. <p>An application sends an LB_GETTOPINDEX message to get the index to the first visible item in the list box. Initially, the first visible item is item 0, but this changes as the list box is scrolled.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga14">LB_GETTOPINDEX</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>The index of the first visible item in the listbox. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00497">497</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga1" doxytag="listbox.h::LB_INSERTSTRING"></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_INSERTSTRING&nbsp;&nbsp;&nbsp;0xF181          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Inserts an item to the list box. <p>An application sends an LB_INSERTSTRING message to insert an item into a list box. Unlike LB_ADDSTRING message, the LB_INSERTSTRING message do not cause the list to be sorted.<p>For a text-only list box:<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga1">LB_INSERTSTRING</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* text; wParam = index; 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>index</em>&nbsp;</td><td>Specifies the index of the position at which to insert the item. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>Pointer to the string of the item to be inserted.</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#ga1">LB_INSERTSTRING</a> <span class="keywordtype">int</span> index; <a class="code" href="struct__LISTBOXITEMINFO.htm">PLISTBOXITEMINFO</a> plbii; 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>)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>index</em>&nbsp;</td><td>Specifies the index of the position at which to insert the item. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>plbii</em>&nbsp;</td><td>Pointer to the listbox item info to be inserted.</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#l00273">273</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>.    </td>  </tr></table><a class="anchor" name="ga49" doxytag="listbox.h::LB_MULTIADDITEM"></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_MULTIADDITEM&nbsp;&nbsp;&nbsp;0xF1B3          </td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>

⌨️ 快捷键说明

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