The GetMenuState function retrieves the menu flags associated with the specified menu item. If the menu item opens a submenu, this function also returns the number of items in the submenu.
The GetMenuState function has been superseded by the GetMenuItemInfo function. You can still use GetMenuState, however, if you do not need any of the extended features of GetMenuItemInfo.
UINT GetMenuState(
HMENU hMenu, |
// handle of menu |
UINT uId, |
// menu item to query |
UINT uFlags |
// menu flags |
); |
Value |
Description |
MF_BYCOMMAND |
Indicates that the uId parameter gives the identifier of the menu item. The MF_BYCOMMAND flag is the default if neither the MF_BYCOMMAND nor MF_BYPOSITION flag is specified. |
MF_BYPOSITION |
Indicates that the uId parameter gives the zero-based relative position of the menu item. |
If the specified item does not exist, the return value is 0xFFFFFFFF.
If the menu item opens a submenu, the low-order byte of the return value contains the menu flags associated with the item, and the high-order byte contains the number of items in the submenu opened by the item.
Value |
Description |
MF_CHECKED |
Places a check mark next to the item (for drop-down menus, submenus, and shortcut menus only). |
MF_DISABLED |
Disables the item. |
MF_GRAYED |
Disables and grays the item. |
MF_HILITE |
Highlights the item. |
MF_MENUBARBREAK |
Functions the same as the MF_MENUBREAK flag, except for drop-down menus, submenus, and shortcut menus, where the new column is separated from the old column by a vertical line. |
MF_MENUBREAK |
Places the item on a new line (for menu bars) or in a new column (for drop-down menus, submenus, and shortcut menus) without separating columns. |
MF_SEPARATOR |
Creates a horizontal dividing line (for drop-down menus, submenus, and shortcut menus only). |
GetMenu, GetMenuItemCount, GetMenuItemID, GetMenuItemInfo
file: /Techref/os/win/api/win32/func/src/f34_12.htm, 5KB, , updated: 2000/4/7 12:19, local time: 2024/8/23 20:48,
3.149.238.49:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.org/Techref/os/win/api/win32/func/src/f34_12.htm"> GetMenuState</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.