📄 group__menu__fns.htm
字号:
<td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga6">HMENU</a> </td> <td class="mdname" nowrap> <em>hmnu</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>item</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__win32__types.htm#ga6">UINT</a> </td> <td class="mdname" nowrap> <em>flag</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Deletes an item from the specified menu. <p>This function deletes an item from the specified menu <em>hmnu</em>. Either the item is a normal menu item or a submenu, this function will delete the item.<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>hmnu</em> </td><td>The handle to the menu. </td></tr> <tr><td valign="top"></td><td valign="top"><em>item</em> </td><td>The position of the menu item or submenu. </td></tr> <tr><td valign="top"></td><td valign="top"><em>flag</em> </td><td>Indicates the position base, can be one of the following values:<ul><li>MF_BYCOMMAND<br> The position value <em>item</em> is based on the command identifier.</li><li>MF_BYPOSITION<br> The position value <em>item</em> is based on the position in the menu.</li></ul></td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The function returns 0 for success, non-zero for failure.</dd></dl><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>ERR_INVALID_HANDLE</em> </td><td><em>hmnu</em> is not a handle to menu. </td></tr> <tr><td valign="top"></td><td valign="top"><em>ERR_INVALID_HMENU</em> </td><td><em>hmnu</em> is an invalid menu.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga5">InsertMenuItem</a>, <a class="el" href="group__menu__fns.htm#ga6">RemoveMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga8" doxytag="window.h::DestroyMenu"></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">int GUIAPI DestroyMenu </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga6">HMENU</a> </td> <td class="mdname1" valign="top" nowrap> <em>hmnu</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Destroys the specified menu and frees any memory that the menu occupies. <p>This function destroys the specified menu <em>hmnu</em> and frees any memory that the menu occupies.<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>hmnu</em> </td><td>The handle to the menu.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The function returns 0 for success, non-zero for failure.</dd></dl><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>ERR_INVALID_HANDLE</em> </td><td><em>hmnu</em> is not a handle to menu.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga6">RemoveMenu</a>, <a class="el" href="group__menu__fns.htm#ga7">DeleteMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga12" doxytag="window.h::DrawMenuBar"></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">void GUIAPI DrawMenuBar </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname1" valign="top" nowrap> <em>hwnd</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Redraws the menu bar of the specified main window. <p>This function redraws the menu bar of the specified main window. If the menu bar changes after the system has created the window, this function must be called to draw the changed menu bar.<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>hwnd</em> </td><td>The handle to the main window.</td></tr> </table></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga13">TrackMenuBar</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga25" doxytag="window.h::EnableMenuItem"></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"><a class="el" href="group__win32__types.htm#ga6">UINT</a> GUIAPI EnableMenuItem </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga6">HMENU</a> </td> <td class="mdname" nowrap> <em>hmnu</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>item</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="group__win32__types.htm#ga6">UINT</a> </td> <td class="mdname" nowrap> <em>flag</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Enables, disables, or grays the specified menu item. <p>This function enables, disables, or grays the specified menu item.<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>hmnu</em> </td><td>[in] Handle to the menu. </td></tr> <tr><td valign="top"></td><td valign="top"><em>item</em> </td><td>[in] Specifies the menu item or submenu to be enabled, disabled, or grayed, as determined by the <em>flag</em> parameter. This parameter specifies an item in a menu bar, menu or submenu. </td></tr> <tr><td valign="top"></td><td valign="top"><em>flag</em> </td><td>[in] Controls the interpretation of the <em>item</em> parameter and indicates whether the menu item is enabled, disabled, or grayed. This parameter must be a combination of either MF_BYPOSITION or MF_BYCOMMAND.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The return value specifies the previous state of the menu item. If the menu item does not exist, the return value is -1.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga19">GetMenuItemInfo</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga11" doxytag="window.h::GetMenu"></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"><a class="el" href="group__handles.htm#ga6">HMENU</a> GUIAPI GetMenu </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname1" valign="top" nowrap> <em>hwnd</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Retrieves the handle to the menu assigned to the given main window. <p>This function retrives the handle to the menu assigned to the given main window <em>hwnd</em>.<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>hwnd</em> </td><td>The handle to the main window. </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the menu of the window.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga10">SetMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga15" doxytag="window.h::GetMenuBarItemRect"></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"><a class="el" href="group__handles.htm#ga6">HMENU</a> GUIAPI GetMenuBarItemRect </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga1">HWND</a> </td> <td class="mdname" nowrap> <em>hwnd</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>int </td> <td class="mdname" nowrap> <em>pos</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__RECT.htm">RECT</a> * </td> <td class="mdname" nowrap> <em>prc</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -