📄 group__ctrl__menubutton__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 menubutton 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 menubutton control<br><small>[<a class="el" href="group__ctrl__menubutton.htm">MenuButton control</a>]</small></h1><h2>Defines</h2><ul><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga0">MBM_ADDITEM</a> 0xF200<dl class="el"><dd class="mdescRight">Sends to the control to add an item to the menu list. <a href="#ga0"></a><br></dl><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga1">MBM_DELITEM</a> 0xF201<dl class="el"><dd class="mdescRight">Sends to the control to delete an item in the menu list. <a href="#ga1"></a><br></dl><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga2">MBM_RESETCTRL</a> 0xF202<dl class="el"><dd class="mdescRight">Sends to the control to remove all items in the menu list. <a href="#ga2"></a><br></dl><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga3">MBM_SETITEMDATA</a> 0xF203<dl class="el"><dd class="mdescRight">Sends to the control to set the data of a specific item. <a href="#ga3"></a><br></dl><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga4">MBM_GETITEMDATA</a> 0xF204<dl class="el"><dd class="mdescRight">Sends to the control to retrive the data of a specific item. <a href="#ga4"></a><br></dl><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga5">MBM_GETCURITEM</a> 0xF206<dl class="el"><dd class="mdescRight">Sends to get the index of the current selected item. <a href="#ga5"></a><br></dl><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga6">MBM_SETCURITEM</a> 0xF207<dl class="el"><dd class="mdescRight">Sends to set the current selected item based on index. <a href="#ga6"></a><br></dl><li>#define <a class="el" href="group__ctrl__menubutton__msgs.htm#ga7">MBM_SETSTRCMPFUNC</a> 0xF208<dl class="el"><dd class="mdescRight">Sets the STRCMP function used to sort items. <a href="#ga7"></a><br></dl></ul><hr><h2>Define Documentation</h2><a class="anchor" name="ga0" doxytag="menubutton.h::MBM_ADDITEM"></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 MBM_ADDITEM 0xF200 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Sends to the control to add an item to the menu list. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__menubutton__msgs.htm#ga0">MBM_ADDITEM</a> <span class="keywordtype">int</span> pos; <a class="code" href="struct__MENUBUTTONITEM.htm">MENUBUTTONITEM</a> newitem; wParam = (<a class="code" href="group__win32__types.htm#ga8">WPARAM</a>)pos; lParam = (<a class="code" href="group__win32__types.htm#ga9">LPARAM</a>)&newitem;</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>pos</em> </td><td>The position at which to add the item. If the control was created with the style of <em>MBS_SORT</em>, this parameter will be ignored. If this parameter is less than 0, the new item will be append to the tail of the menu list. </td></tr> <tr><td valign="top"></td><td valign="top"><em>newitem</em> </td><td>Pointer to the menubutton item info structure.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The position at which the item has been added, i.e., the index of the added item if success. Otherwise, the following error code will be returned:</dd></dl><ul><li>MB_ERR_SPACE<br> No memory can be allocated for new item. </li></ul><p>Definition at line <a class="el" href="menubutton_8h-source.htm#l00180">180</a> of file <a class="el" href="menubutton_8h-source.htm">menubutton.h</a>. </td> </tr></table><a class="anchor" name="ga1" doxytag="menubutton.h::MBM_DELITEM"></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 MBM_DELITEM 0xF201 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Sends to the control to delete an item in the menu list. <p><div class="fragment"><pre class="fragment"> MBM_DELETEITEM <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> </td><td>The index of the item to be deleted.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>MB_OKAY if success, else MB_INV_ITEM to indicate valid index. </dd></dl><p>Definition at line <a class="el" href="menubutton_8h-source.htm#l00198">198</a> of file <a class="el" href="menubutton_8h-source.htm">menubutton.h</a>. </td> </tr></table><a class="anchor" name="ga5" doxytag="menubutton.h::MBM_GETCURITEM"></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 MBM_GETCURITEM 0xF206 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Sends to get the index of the current selected item. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__menubutton__msgs.htm#ga5">MBM_GETCURITEM</a> wParam = 0; lParam = 0;</pre></div><p><dl compact><dt><b>Returns:</b></dt><dd>The index of the current selected item. If there is no seleted item, MB_INV_ITEM will be returned. </dd></dl><p>Definition at line <a class="el" href="menubutton_8h-source.htm#l00274">274</a> of file <a class="el" href="menubutton_8h-source.htm">menubutton.h</a>. </td> </tr></table><a class="anchor" name="ga4" doxytag="menubutton.h::MBM_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 MBM_GETITEMDATA 0xF204 </td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Sends to the control to retrive the data of a specific item. <p><div class="fragment"><pre class="fragment"> <a class="code" href="group__ctrl__menubutton__msgs.htm#ga4">MBM_GETITEMDATA</a> <span class="keywordtype">int</span> index; <a class="code" href="struct__MENUBUTTONITEM.htm">PMENUBUTTONITEM</a> pmbi; 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>)pmbi;</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 specific item. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pmbi</em> </td><td>Pointer to the MENUBUTTONITEM structure for storing the menubutton item data.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>MB_OKAY if success, otherwise MB_INV_ITEM to indicate invalid index. </dd></dl><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -