📄 group__menu__fns.htm
字号:
<tr> <td class="md" nowrap valign="top"><a class="el" href="group__handles.htm#ga6">HMENU</a> GUIAPI SetMenu </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__handles.htm#ga6">HMENU</a> </td> <td class="mdname" nowrap> <em>hmnu</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>Assigns a new menu to the specified main window. <p>This functionn assigns the specified menu <em>hmnu</em> to the main window specified by <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> <tr><td valign="top"></td><td valign="top"><em>hmnu</em> </td><td>The handle to the new menu.</td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The handle to the old menu of the window.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__menu__fns.htm#ga11">GetMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga27" doxytag="window.h::SetMenuItemBitmaps"></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 SetMenuItemBitmaps </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__BITMAP.htm">PBITMAP</a> </td> <td class="mdname" nowrap> <em>hBmpUnchecked</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap><a class="el" href="struct__BITMAP.htm">PBITMAP</a> </td> <td class="mdname" nowrap> <em>hBmpChecked</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>Associates the specified bitmap with a menu item. <p>This function associates the specified bitmap with a menu item. Whether the menu item is checked or unchecked, the system displays the appropriate bitmap next to the 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>item</em> </td><td>The position of the menu item. </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>hBmpUnchecked</em> </td><td>The pointer to the unchecked BITMAP object. </td></tr> <tr><td valign="top"></td><td valign="top"><em>hBmpChecked</em> </td><td>The pointer to the checked BITMAP object.</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="ga28" doxytag="window.h::SetMenuItemInfo"></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 SetMenuItemInfo </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>Changes information about a menu item. <p>This function changes information about 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 that contains the menu item. </td></tr> <tr><td valign="top"></td><td valign="top"><em>item</em> </td><td>[in] Specifies the identifier or position of the menu item to change. The meaning of this parameter depends on the value of <em>flag</em>. </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>The pointer to a MENUITEMINFO structure contains the information.</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#ga19">GetMenuItemInfo</a>, <a class="el" href="group__menu__fns.htm#ga0">MENUITEMINFO</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga22" doxytag="window.h::StripPopupHead"></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 StripPopupHead </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>Strips the title of the popup menu. <p>This function strips the title of the popup menu <em>hpppmnu</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>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 whose title has been stripped.</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="ga13" doxytag="window.h::TrackMenuBar"></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 TrackMenuBar </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"></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>Displays the specified submenu. <p>This function displays the specified submenu in the menu bar of the specified 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> <tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>The position of the submenu. The position value of the first submenu is 0. </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#ga14">TrackPopupMenu</a>, <a class="el" href="group__menu__fns.htm#ga2">CreateMenu</a> </dd></dl> </td> </tr></table><a class="anchor" name="ga14" doxytag="window.h::TrackPop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -