IMainMenu
What it does
A collection of IMenuItem interfaces. Represents the main window menu.
For all items of this menu, the TCommandID property returns CI_SubMenu.
Methods
Definition | Description |
Reset() | Resets the menu (restores the original view). |
Important! After applying the Reset method the current object of IMainMenu type is destructed and a new object is generated. As a result, all references to the current object become invalid and attempts to use it will generate an exception. You must either define a new object or initialize the existing object anew.
The sample code below demonstrates applying the Reset method to an object. As a result, the menu object becomes invalid and cannot be referred to.
// Define a new IMainMenu object and initialize it
IMainMenu menu = TaskWindow.MainWindow.MainMenu;
// Call the Reset method
menu.Reset();
12.04.2024 18:16:02