📄 group__menu__fns.htm
字号:
Retrieves the rect of a menu bar item. <p>This function retrieves the rect of the menu bar item specified by the parameter <em>pos</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> <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>prc</em> </td><td>The pointer to a RECT object, which will receive the rectangle.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The function returns the handle to the menu bar if success, otherwise returns 0.</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="ga17" doxytag="window.h::GetMenuItemCount"></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 GetMenuItemCount </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 the number of items in a menu. <p>This function determines the number of items in the specified 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> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The number of the items in the menu.</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="ga18" doxytag="window.h::GetMenuItemID"></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 GetMenuItemID </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>pos</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>Retrieves the menu item identifier of a menu item at specified position in a menu. <p>This function retrieves the menu item identifier of a menu item at the specified position <em>pos</em> in the specified 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>pos</em> </td><td>The position of the menu item. The position value of the first item is 0.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The identifier of the items in the menu.</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="ga19" doxytag="window.h::GetMenuItemInfo"></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 GetMenuItemInfo </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>Retrieves information about a menu item. <p>This function retrieves information about a menu item, and returns the information via <em>pmii</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>[in] Handle to the menu that contains the menu item. </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> <tr><td valign="top"></td><td valign="top"><em>pmii</em> </td><td>[in, out] Pointer to a <em>MENUITEMINFO</em> structure that specifies the information to retrieve and receive information about the menu item.</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>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga28">SetMenuItemInfo</a>, <a class="el" href="group__menu__fns.htm#ga0">MENUITEMINFO</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga21" doxytag="window.h::GetPopupSubMenu"></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 GetPopupSubMenu </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>hpppmnu</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 submenu of the specified popup menu. <p>This function retrieves the submenu of the specified popup menu.<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>hpppmnu</em> </td><td>The handle to the popup menu.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the submenu of the popup menu.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga3">CreatePopupMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga23" doxytag="window.h::GetSubMenu"></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 GetSubMenu </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>pos</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>Retrieves the handle to the submenu activated by the specified menu item. <p>This function retrieves the handle to the drop-down menu or submenu activated by 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>The handle to the menu. </td></tr> <tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>The position of the menu item. The position value of the first item is 0.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the submenu; 0 if the menu item can not activate a submenu.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga21">GetPopupSubMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga24" doxytag="window.h::GetSystemMenu"></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 GetSystemMenu </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><a class="el" href="group__simple__types.htm#ga0">BOOL</a> </td> <td class="mdname" nowrap> <em>flag</em></td> </tr> <tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -