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();

15.11.2022 10:12:44

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.