📄 group__menu__fns.htm
字号:
<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>Allows the application to access the window menu (also known as the system menu) for copying and modifying. <p>This function returns the handle to the system menu of the main window. This allows the application to access the window menu (also known as the system menu) for copying and modifying.<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> <tr><td valign="top"></td><td valign="top"><em>flag</em> </td><td>Ignored currently; reserved for future use.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the system menu; 0 if the main window has not a system menu.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga11">GetMenu</a>, <a class="el" href="group__menu__fns.htm#ga10">SetMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga16" doxytag="window.h::HiliteMenuBarItem"></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__simple__types.htm#ga0">BOOL</a> GUIAPI HiliteMenuBarItem </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="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>Draws the specified menubar item with 3D effect. <p>This function draws the specified menubar item with 3D effect.<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> <tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>The position of the item. The position value of the first item is 0. </td></tr> <tr><td valign="top"></td><td valign="top"><em>flag</em> </td><td>The drawing flag, can be one of the following values:<ul><li>HMF_UPITEM<br> Up item.</li><li>HMF_DOWNITEM<br> Down item.</li><li>HMF_DEFAULT<br> Default.</li></ul></td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>TRUE on success, otherwise FALSE.</dd></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="ga5" doxytag="window.h::InsertMenuItem"></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 InsertMenuItem </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" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__MENUITEMINFO.htm">PMENUITEMINFO</a> </td> <td class="mdname" nowrap> <em>pmii</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>Inserts a new menu item at the specified position in a menu. <p>This function inserts a new menu item specified by <em>pmmi</em> at the specified position (determined by <em>item</em> and <em>flag</em>) in the menu <em>hmnu</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>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 insertion position. </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. The new menu item will insert bellow the item whose id is <em>item</em>.</li><li>MF_BYPOSITION<br> The position value <em>item</em> is based on the position in the menu. </li></ul></td></tr> <tr><td valign="top"></td><td valign="top"><em>pmii</em> </td><td>Menu item information used to create the popup 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> <tr><td valign="top"></td><td valign="top"><em>ERR_RES_ALLOCATION</em> </td><td>Can not allocate new menu item. </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#ga6">RemoveMenu</a>, <a class="el" href="group__menu__fns.htm#ga0">MENUITEMINFO</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga9" doxytag="window.h::IsMenu"></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 IsMenu </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>Determines whether a handle is a menu handle. <p>This function determines whether the handle specified by <em>hmnu</em> is a menu handle.<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 a menu.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The function returns 0 for none menu handle, otherwise the type of the menu.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga2">CreateMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga6" doxytag="window.h::RemoveMenu"></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 RemoveMenu </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>Deletes a menu item or detaches a submenu from the specified menu. <p>This function deletes a menu item or detaches a submenu from the specified menu <em>hmnu</em>. If the item is a normal menu item, the function will delete the item. If the item is a submenu, the function will detache the submenu for the menu, but not delete the submenu.<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#ga7">DeleteMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga10" doxytag="window.h::SetMenu"></a><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -