|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| user32.lib
| Header File
| winuser.h
| Unicode
| No
| Platform Notes
| None
|
|
|
GetMenuState
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, GetMenuString
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|