📄 group__ctrl__listbox__msgs.htm
字号:
<td> </td> <td><p>Appends the multi strings. <p>An application sends an LB_MULTIADDITEM message to append item array 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#ga49">LB_MULTIADDITEM</a> <span class="keywordtype">int</span> num; <span class="keyword">const</span> <span class="keywordtype">char</span> text[num][]; wParam = num; 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>num</em> </td><td>is count of text array </td></tr> <tr><td valign="top"></td><td valign="top"><em>text</em> </td><td>pointer to the string of the item array 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#ga49">LB_MULTIADDITEM</a> <a class="code" href="struct__LISTBOXITEMINFO.htm">LISTBOXITEMINFO</a> plbii[num]; wParam = num; 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>num</em> </td><td>is count of plbii array </td></tr> <tr><td valign="top"></td><td valign="top"><em>plbii</em> </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#l01034">1034</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga4" doxytag="listbox.h::LB_RESETCONTENT"></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_RESETCONTENT 0xF184 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Removes the contents of a list box. <p>An application sends an LB_RESETCONTENT message to remove the all items in a list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga4">LB_RESETCONTENT</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>Always be zero. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00314">314</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga30" doxytag="listbox.h::LB_SETCARETINDEX"></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_SETCARETINDEX 0xF19E </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Sets the focus rectangle to the item at the specified index. <p>An application sends an LB_SETCARETINDEX message to set the focus rectangle to the item at the specified index in a multiple-selection list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga30">LB_SETCARETINDEX</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>Definition at line <a class="el" href="listbox_8h-source.htm#l00698">698</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga42" doxytag="listbox.h::LB_SETCHECKMARK"></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_SETCHECKMARK 0xF1AC </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Sets check mark status of an item. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga42">LB_SETCHECKMARK</a> <span class="keywordtype">int</span> index, status; 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>)status;</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> </td><td>The index of the specified item. </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>The new check mark status, can be one of the followings.<ul><li>CMFLAG_CHECKED<br> The item is checked.</li><li>CMFLAG_PARTCHECKED<br> The item is partly checked.</li></ul></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 or this list box have no LBS_CHECKBOX style. </li></ul></dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00855">855</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga8" doxytag="listbox.h::LB_SETCURSEL"></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_SETCURSEL 0xF186 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Selects an item. <p>An application sends an LB_SETCURSEL message to a list box to select an item and scroll it into view, if necessary.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga8">LB_SETCURSEL</a> <span class="keywordtype">int</span> cursel; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)cursel; 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>cursel</em> </td><td>The index of the item to be selected and hilighted.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The old index of the item selected on error, else LB_ERR to indicate an error occurred. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00408">408</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga44" doxytag="listbox.h::LB_SETITEMADDDATA"></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_SETITEMADDDATA 0xF1AE </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Associates a 32-bit data value with an item. <p>An application sends an LB_SETITEMADDDATA message to associate a 32-bit data value specified in the <em>lParam</em> parameter with an item in the list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga44">LB_SETITEMADDDATA</a> <span class="keywordtype">int</span> index; <a class="code" href="group__win32__types.htm#ga4">DWORD</a> addData; 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>)addData;</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> </td><td>The index of the specified item. </td></tr> <tr><td valign="top"></td><td valign="top"><em>addData</em> </td><td>the 32-bit data value which will associated with 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><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00905">905</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga48" doxytag="listbox.h::LB_SETITEMBOLD"></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_SETITEMBOLD 0xF1B2 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Sets the item display use bold font. <p>An application sends an LB_SETITEMBOLD message to set a item display use bold font.<p><div class="fragment"><pre class="fragment"> wParam = index; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)bold;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>One of the following values:<ul><li>LB_OKAY<br> Success</li><li>LB_ERR<br> index of item is not exist. </li></ul></dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00990">990</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga26" doxytag="listbox.h::LB_SETITEMDATA"></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_SETITEMDATA 0xF19A </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -