Initializes a new instance of the Menu.MenuItemCollection class.
[Visual Basic] Public Sub New( _ ByVal owner As Menu _ ) [C#] public Menu.MenuItemCollection( Menu owner ); [C++] public: MenuItemCollection( Menu* owner ); [JScript] public function Menu.MenuItemCollection( owner : Menu );
- The Menu that owns this collection.
This class requires that you associate the collection with a class that derives from Menu, such as the MainMenu, ContextMenu, or MenuItem class. Since you must specify a menu that is associated with this collection, you cannot create multiple menu item collections and associate them with a menu as needed. In order to switch the menu items associated with a menu, you must clear the collection of items and add the menu items to display to the collection.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family