Desktop Functions: Smart Device Functions:
|
Search Results for "MENUITEMINFO" in [All]user32
MENUITEMINFO mii = new MENUITEMINFO();
MENUITEMINFO sep = new MENUITEMINFO();
MENUITEMINFO mii = new MENUITEMINFO();
internal static extern bool InsertMenuItem(HMenu hmenu, uint uposition, uint uflags, ref MENUITEMINFO mii);
static extern bool GetMenuItemInfo(IntPtr hMenu, uint uItem, bool fByPosition, ref MENUITEMINFO lpmii);
public struct MENUITEMINFO
MENUITEMINFO mif = new MENUITEMINFO();
mif.cbSize = (uint)Marshal.SizeOf(typeof(MENUITEMINFO));
bool a = GetMenuItemInfo(hMenu, 0, true, ref mif); 3: InsertMenu
[In] ref MENUITEMINFO lpmii);
ByVal fByPosition As Boolean, ByRef lpmii As MENUITEMINFO) As Boolean 4: SetMenu
static extern bool SetMenuItemInfo(IntPtr hMenu, uint uItem, bool fByPosition,
[In] ref MENUITEMINFO lpmii);
Public Declare Function SetMenuItemInfo Lib "user32" (ByVal hMenu As IntPtr, ByVal uItem As uint, ByVal fByPosition As Boolean, ByRef lpmii As MENUITEMINFO) As Boolean It's very important to specify 'ref' on the MENUITEMINFO otherwise on Windows 7 32-bit user32.dll will crash with the error text 0a9e372d3b4ad19135b953a78882e789. However, Windows 8.1 64 bit it works with or without the 'ref' keyword. Tested both using NET40.
static extern bool SetMenuItemInfo(IntPtr hMenu, uint uItem, bool fByPosition,
[In] ref MENUITEMINFO lpmii);
Public Declare Function SetMenuItemInfo Lib "user32" (ByVal hMenu As IntPtr, ByVal uItem As uint, ByVal fByPosition As Boolean, ByRef lpmii As MENUITEMINFO) As Boolean Structures6: MENUITEMINFO
|