📄 group__ctrl__listbox__msgs.htm
字号:
<dl compact><dt><b>Return values:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>LB_ERR</em> </td><td>Invalid item index or the list box have no LBS_CHECKBOX style. </td></tr> <tr><td valign="top"></td><td valign="top"><em>CMFLAG_CHECKED</em> </td><td>The item is checked. </td></tr> <tr><td valign="top"></td><td valign="top"><em>CMFLAG_PARTCHECKED</em> </td><td>The item is partly checked. </td></tr> <tr><td valign="top"></td><td valign="top"><em>CMFLAG_BLANK</em> </td><td>The item is not checked. </td></tr> </table></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00830">830</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga11" doxytag="listbox.h::LB_GETCOUNT"></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_GETCOUNT 0xF18B </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets the number of items in the list box. <p>An application sends an LB_GETCOUNT message to a list box to get the number of items in the list box.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga11">LB_GETCOUNT</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>The number of items in the listbox. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00475">475</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga7" doxytag="listbox.h::LB_GETCURSEL"></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_GETCURSEL 0xF188 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets the index of the currently selected or highlighted item. <p>An application sends an LB_GETCURSEL message to a list box to get the index of the currently selected item, if there is one, in a single-selection list box. For multiple-selection list box, appliction send an LB_GETCURSEL message to a list box to get the index of the current highlighted item.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga7">LB_GETCURSEL</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>The index of the currently selected item for single-selection list box; Else the index of the highlighted item for multiple-selection list box. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00386">386</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga43" doxytag="listbox.h::LB_GETITEMADDDATA"></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_GETITEMADDDATA 0xF1AD </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets the 32-bit data value associated with an item. <p>An application sends an LB_GETITEMADDDATA message to a list box to get the 32-bit data value the list box has stored for the item with index of <em>wParam</em>; By default this is zero. An application must set the item data value by sending an LB_SETITEMADDDATA message to the list box for this value to have meaning.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga43">LB_GETITEMADDDATA</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> </td><td>The index of the specified item.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The 32-bit data value associated with an item on success, otherwise LB_ERR to indicate an error. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00880">880</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga25" doxytag="listbox.h::LB_GETITEMDATA"></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_GETITEMDATA 0xF199 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets item data in a list box if the box has LBS_CHECKBOX and/or LBS_USEICON styles. <p>An application sends LB_GETITEMDATA message to a list box to retrive the check box flag and the handle of icon. Note that the text of the item will not be returned, i.e., the field of <em>string</em> of LISTBOXITEMINFO structure will be ignored.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga25">LB_GETITEMDATA</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> </td><td>The index of the specified item. </td></tr> <tr><td valign="top"></td><td valign="top"><em>plbii</em> </td><td>Pointer to the buffer used for storing the item data of the specified item.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>LB_OKAY on success; LB_ERR on error.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__ctrl__listbox.htm#ga0">LISTBOXITEMINFO</a> </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00648">648</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga47" doxytag="listbox.h::LB_GETITEMDISABLE"></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_GETITEMDISABLE 0xF1B1 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Get the item disable status. <p>An application sends an LB_SETITEMDISABLE message to get a item to disable status.<p><div class="fragment"><pre class="fragment"> wParam = index; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>One of the following values:<ul><li>TRUE<br> Item is disable</li><li>FLASE<br> Item is enable </li></ul></dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00972">972</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga33" doxytag="listbox.h::LB_GETITEMHEIGHT"></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_GETITEMHEIGHT 0xF1A1 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Gets the height in pixels of an item specified in the wParam parameter. <p>An application sends an LB_GETITEMHEIGHT message to a list box to get the height in pixels of an item specified in the wParam parameter.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga33">LB_GETITEMHEIGHT</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>The height of item in the listbox. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00756">756</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga24" doxytag="listbox.h::LB_GETITEMRECT"></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_GETITEMRECT 0xF198 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrieves the dimensions of the rectangle. <p>An application sends an LB_GETITEMRECT message to a list box to retrieve the dimensions of the rectangle that bounds an item as it is currently displayed in the list box window. The item is specified in the wParam parameter, and a pointer to a RECT structure is given in the lParam parameter.<p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__listbox__msgs.htm#ga24">LB_GETITEMRECT</a> <span class="keywordtype">int</span> index; <a class="code" href="struct__RECT.htm">RECT</a> *rcItem; 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>)rcItem;</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>rcItem</em> </td><td>Pointer to the buffer used for storing the item rect;</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>LB_OKAY on success; LB_ERR on error. </dd></dl><p>Definition at line <a class="el" href="listbox_8h-source.htm#l00619">619</a> of file <a class="el" href="listbox_8h-source.htm">listbox.h</a>. </td> </tr></table><a class="anchor" name="ga5" doxytag="listbox.h::LB_GETSEL"></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_GETSEL 0xF187 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -