|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| No
| Import Library
| -
| Header File
| winuser.h
| Unicode
| WinNT
| Platform Notes
| None
|
|
|
MENUITEMINFO
The MENUITEMINFO structure contains information about a menu item.
typedef struct tagMENUITEMINFO {
UINT cbSize;
UINT fMask;
UINT fType;
UINT fState;
UINT wID;
HMENU hSubMenu;
HBITMAP hbmpChecked;
HBITMAP hbmpUnchecked;
DWORD dwItemData;
LPTSTR dwTypeData;
UINT cch;
} MENUITEMINFO, FAR *LPMENUITEMINFO;
Members
cbsize
Size of structure, in bytes.
fMask
Members to retrieve or set. This member can be one or more of these values:
Value
| Meaning
| MIIM_CHECKMARKS
| Retrieves or sets the hbmpChecked and hbmpUnchecked members.
| MIIM_DATA
| Retrieves or sets the dwItemData member.
| MIIM_ID
| Retrieves or sets the wID member.
| MIIM_STATE
| Retrieves or sets the fState member.
| MIIM_SUBMENU
| Retrieves or sets the hSubMenu member.
| MIIM_TYPE
| Retrieves or sets the fType and dwTypeData members.
|
fType
Menu item type. This member can be one or more of these values:
Value
| Meaning
| MFT_BITMAP
| Displays the menu item using a bitmap. The low-order word of the dwTypeData member is the bitmap handle, and the cch member is ignored.
| MFT_MENUBARBREAK
| Places the menu item on a new line (for a menu bar) or in a new column (for a
drop-down menu, submenu, or shortcut menu). For a drop-down menu, submenu, or
shortcut menu, a vertical line separates the new column from the old.
| MFT_MENUBREAK
| Places the menu item on a new line (for a menu bar) or in a new column (for a
drop-down menu, submenu, or shortcut menu). For a drop-down menu, submenu, or
shortcut menu, the columns are not separated by a vertical line.
| MFT_OWNERDRAW
| Assigns responsibility for drawing the menu item to the window that owns the
menu. The window receives a WM_MEASUREITEM message before the menu is displayed for the first time, and a WM_DRAWITEM message whenever the appearance of the menu item must be updated. If this
value is specified, the dwTypeData member contains an application-defined 32-bit value.
| MFT_RADIOCHECK
| Displays checked menu items using a radio-button mark instead of a check mark
if the hbmpChecked member is NULL.
| MFT_RIGHTJUSTIFY
| Right-justifies the menu item and any subsequent items. This value is valid
only if the menu item is in a menu bar.
| MFT_SEPARATOR
| Specifies that the menu item is a separator. A menu item separator appears as
a horizontal dividing line. The dwTypeData and cch members are ignored. This value is valid only in a drop-down menu, submenu,
or shortcut menu.
| MFT_STRING
| Displays the menu item using a text string. The dwTypeData member is the pointer to a null-terminated string, and the cch member is the length of the string.
|
The MFT_BITMAP, MFT_SEPARATOR, and MFT_STRING values cannot be combined with
one another.
fState
Menu item state. This member can be one or more of these values:
Value
| Meaning
| MFS_CHECKED
| Checks the menu item. For more information about checked menu items, see the hbmpChecked member.
| MFS_DEFAULT
| Specifies that the menu item is the default. A menu can contain only one
default menu item, which is displayed in bold.
| MFS_DISABLED
| Disables the menu item so that it cannot be selected, but does not gray it.
| MFS_ENABLED
| Enables the menu item so that it can be selected. This is the default state.
| MFS_GRAYED
| Disables the menu item and grays it so that it cannot be selected.
| MFS_HILITE
| Highlights the menu item.
| MFS_UNCHECKED
| Unchecks the menu item. For more information about unchecked menu items, see
the hbmpUnchecked member.
| MFS_UNHILITE
| Removes the highlight from the menu item. This is the default state.
|
wID
Application-defined 16-bit value that identifies the menu item.
hSubMenu
Handle to the drop-down menu or submenu associated with the menu item. If the
menu item is not an item that opens a drop-down menu or submenu, this member is
NULL.
hbmpChecked
Handle to the bitmap to display next to the item if it is checked. If this
member is NULL, a default bitmap is used. If the MFT_RADIOCHECK type value is
specified, the default bitmap is a bullet. Otherwise, it is a check mark.
hbmpUnchecked
Handle to the bitmap to display next to the item if it is not checked. If this
member is NULL, no bitmap is used.
dwItemData
Application-defined value associated with the menu item.
dwTypeData
Content of the menu item. The meaning of this member depends on the menu item
type: the MFT_BITMAP, MFT_SEPARATOR, or MFT_STRING values.
cch
Length of the menu item text, when information is received about a menu item
of the MFT_STRING type. This value is zero for other menu item types. This
member is ignored when the content of a menu item is set.
Remarks
The MENUITEMINFO structure is used with the GetMenuItemInfo, InsertMenuItem, and SetMenuItemInfo functions.
See Also
GetMenuItemInfo, InsertMenuItem, SetMenuItemInfo, WM_DRAWITEM, WM_MEASUREITEM
| 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
|