MENUINFO structure (winuser.h)
Contains information about a menu.
Syntax
typedef struct tagMENUINFO {
DWORD cbSize;
DWORD fMask;
DWORD dwStyle;
UINT cyMax;
HBRUSH hbrBack;
DWORD dwContextHelpID;
ULONG_PTR dwMenuData;
} MENUINFO, *LPMENUINFO;
Members
cbSize
Type: DWORD
The size of the structure, in bytes. The caller must set this member to sizeof(MENUINFO)
.
fMask
Type: DWORD
Indicates the members to be retrieved or set (except for MIM_APPLYTOSUBMENUS). This member can be one or more of the following values.
Value | Meaning |
---|---|
|
Settings apply to the menu and all of its submenus. SetMenuInfo uses this flag and GetMenuInfo ignores this flag |
|
Retrieves or sets the hbrBack member. |
|
Retrieves or sets the dwContextHelpID member. |
|
Retrieves or sets the cyMax member. |
|
Retrieves or sets the dwMenuData member. |
|
Retrieves or sets the dwStyle member. |
dwStyle
Type: DWORD
The menu style. This member can be one or more of the following values.
Value | Meaning |
---|---|
|
Menu automatically ends when mouse is outside the menu for approximately 10 seconds. |
|
The same space is reserved for the check mark and the bitmap. If the check mark is drawn, the bitmap is not. All checkmarks and bitmaps are aligned. Used for menus where some items use checkmarks and some use bitmaps. |
|
Menu items are OLE drop targets or drag sources. Menu owner receives WM_MENUDRAG and WM_MENUGETOBJECT messages. |
|
Menu is modeless; that is, there is no menu modal message loop while the menu is active. |
|
No space is reserved to the left of an item for a check mark. The item can still be selected, but the check mark will not appear next to the item. |
|
Menu owner receives a WM_MENUCOMMAND message instead of a WM_COMMAND message when the user makes a selection. MNS_NOTIFYBYPOS is a menu header style and has no effect when applied to individual sub menus. |
cyMax
Type: UINT
The maximum height of the menu in pixels. When the menu items exceed the space available, scroll bars are automatically used. The default (0) is the screen height.
hbrBack
Type: HBRUSH
A handle to the brush to be used for the menu's background.
dwContextHelpID
Type: DWORD
The context help identifier. This is the same value used in the GetMenuContextHelpId and SetMenuContextHelpId functions.
dwMenuData
Type: ULONG_PTR
An application-defined value.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | winuser.h (include Windows.h) |