[DllImport("user32.dll")]
static extern bool GetMenuItemInfo(IntPtr hMenu, uint uItem, bool fByPosition, ref MENUITEMINFO lpmii);
[StructLayout(LayoutKind.Sequential)]
public struct MENUITEMINFO
{
public uint cbSize;
public uint fMask;
public uint fType;
public uint fState;
public int wID;
public int hSubMenu;
public int hbmpChecked;
public int hbmpUnchecked;
public int dwItemData;
public string dwTypeData;
public uint cch;
public int hbmpItem;
}
// Values for the fMask parameter
//From winuser.h
const UInt32 MIM_MAXHEIGHT = 0x00000001;
const UInt32 MIM_BACKGROUND = 0x00000002;
const UInt32 MIM_HELPID = 0x00000004;
const UInt32 MIM_MENUDATA = 0x00000008;
const UInt32 MIM_STYLE = 0x00000010;
const UInt32 MIM_APPLYTOSUBMENUS = 0x80000000;
Please add some!
MENUITEMINFO mif = new MENUITEMINFO();
mif.cbSize = (uint)Marshal.SizeOf(typeof(MENUITEMINFO));
mif.fMask = 0x10;
mif.fType = 0;
mif.dwTypeData = null;
bool a = GetMenuItemInfo(hMenu, 0, true, ref mif);
Do you know one? Please contribute it!