Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than user32, prefix the name with the module name and a period.
[StructLayout(LayoutKind.Sequential)]
public class MENUITEMINFO{
public Int32 cbSize = Mashal.SizeOf(typeof(MENUITEMINFO));
public MIIM fMask;
public UInt32 fType;
public UInt32 fState;
public UInt32 wID;
public IntPtr hSubMenu;
public IntPtr hbmpChecked;
public IntPtr hbmpUnchecked;
public IntPtr dwItemData;
public string dwTypeData = null;
public UInt32 cch;
public IntPtr hbmpItem;
public MENUITEMINFO() { }
public MENUITEMINFO(MIIM pfMask) {
fMask = pfMask;
}
}
public const UInt32 MF_BYCOMMAND = 0x00000000;
public const UInt32 MF_BYPOSITION = 0x00000400;
// Values for the fMask parameter
[Flags]
public enum MIIM {
BITMAP = 0x00000080,
CHECKMARKS = 0x00000008,
DATA = 0x00000020,
FTYPE = 0x00000100,
ID = 0x00000002,
STATE = 0x00000001,
STRING = 0x00000040,
SUBMENU = 0x00000004,
TYPE = 0x00000010
}
Tips & Tricks:
Please add some!
Sample Code:
MENUITEMINFO mif = new MENUITEMINFO(MIIM.TYPE);
bool a = GetMenuItemInfo(hMenu, 0, true, mif);
Alternative Managed API:
Do you know one? Please contribute it!
The GetMenuItemInfo API
5/11/2018 1:59:20 PM - NetMage-165.214.11.83
The MIIM enumeration provides values for the [MENUITEMINFO] fMask flags
5/11/2018 1:57:58 PM - NetMage-165.214.11.83
The MENUITEMINFO structure contains information about a menu item.
5/11/2018 1:58:33 PM - NetMage-165.214.11.83
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).