How to build custom menu for Outlook Express add-in.
OE menu item styles - VB.NET, C#, C++.
Add-in Express Home > Add-in Express for Outlook Express > Online Guide > Customizing Outlook Express menus
Customizing Outlook Express main menu
To customize the Outlook Express (OE) or Windows Mail menu, you right-click the design surface of the add-in module and choose the Explorer MenuBar or Inspector MenuBar component in the context menu (VB.NET, C# and C++ are supported). These components allow customizing Explorer menu and Inspector menu in Outlook Express respectively. When you add such a component to the OE module, you click the property editor button of the Controls property (in the Properties window).
This opens the property editor window. Please note that the window contains a number of items that correspond to top-level menu items in corresponding OE window. Say, for the component above, the property editor window contains placeholders for the following top-level menu items of the Explorer window: File, Edit, View, Tools, Message, and Help.
Please note that no changes in these placeholder components will reflect to the actual menu items. The only way to customize menus is adding your controls to the Controls collection of the placeholder items. For instance, you can add an item to the Controls collection of the File menu placeholder.
Outlook Express menu item styles
The most important property of the item is Style. There are two possible values of this property:
misButton. This value of the Style property generates an ordinary item. When clicked, it generates the Click event. However, if you add a number of other buttons into its Controls collection and click it, this event isn't triggered. Instead, this shows a popup menu that lists all other buttons from its Controls collection. It isn't possible to show icons for those buttons. AdxoeMenuItem1 and AdxoeMenuItem3 on the picture above are examples of such a button.
misCheckedButton. This value of the Style property generates an item that can be in two states: checked and unchecked. When clicked, it changes the checked state and generates the Click event. However, if you add a number of other buttons into its Controls collection and click it, this event isn't triggered. Instead, this shows a popup menu that lists all other buttons from its Controls collection. It isn't possible to show icons for those buttons. AdxoeMenuItem2 and AdxoeMenuItem4 on the picture above are examples of such a button.
Processing custom Outlook Express menu items
The only event the menu items provide is Click. In the Properties window, use the combo box at the top of the window to choose a menu item. Then, switch to the Events view and double-click the event of your choice. This creates the event handler and opens the code window. Now you just write the code.
Handling OE events
To handle Outlook Express events, you right-click the design surface of the add-in module and choose the corresponding Add-in Express component in the context menu.
As you can see in the pictures above, the component provides a set of OE events. To create an event handler, in the Properties window, just double-click an event of your choice.