@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: This function enables or disables (grays) the specified menu item. !!!!C# Signature: [DllImport("coredll.dll", SetLastError=true)] static extern uint EnableMenuItem(IntPtr hMenu, uint itemId, uint uEnable); !!!!User-Defined Types: ''[uEnable]'' uint MF_BYCOMMAND = 0x00000000; uint MF_BYPOSITION = 0x00000400; uint MF_ENABLED = 0x00000000; uint MF_GRAYED = 0x00000001; uint MF_STRING = 0x00000000; !!!!Alternative Managed API: Do you know one? Please contribute it! !!!!Notes: None. !!!!Tips & Tricks: Use MF_BYCOMMAND to specify the item ID on ''[itemId]'' parameter or use MF_BYPOSITION to specify the zero-based index of the item, if neither MF_BYCOMMAND nor MF_BYPOSITION is specified the item ID is used. !!!!Sample Code: IntPtr hMenu = CreatePopupMenu(); AppendMenu(hMenu, MF_STRING, 1001, "Enabled Item"); AppendMenu(hMenu, MF_STRING, 1002, "Disabled Item"); EnableMenuItem(hMenu, 0, MF_BYPOSITION | MF_ENABLED); EnableMenuItem(hMenu, 1002, MF_BYCOMMAND | MF_GRAYED); Documentation: EnableMenuItem@msdn on MSDN
Edit coredll.EnableMen...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.