please dont rip this site Prev Next

GetMenuState info  Overview  Group

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

   );

Parameters

hMenu
Identifies the menu that contains the menu item whose flags are to be retrieved.
uId
Specifies the menu item for which the menu flags are to be retrieved, as determined by the uFlags parameter.
uFlags
Specifies how the uId parameter is interpreted. This parameter can be one of the following values:

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.

Return Values

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.

Otherwise, the return value is a mask (Boolean OR) of the menu flags. Following are the menu flags associated with the menu 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).

See Also

GetMenu, GetMenuItemCount, GetMenuItemID, GetMenuItemInfo


file: /Techref/os/win/api/win32/func/src/f34_12.htm, 5KB, , updated: 2000/4/7 11:19, local time: 2024/11/23 20:08,
TOP NEW HELP FIND: 
3.145.155.149: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?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://ecomorder.com/techref/os/win/api/win32/func/src/f34_12.htm"> GetMenuState</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .