UpdateContextMenu Event (Alert Control)
   Windows - Visual C++
   Description
   The UpdateContextMenu event is 
   fired immediately before the context menu appears when the user right 
   mouse clicks in an Alert window, in order to give the container a 
   chance to update menu items.
DispId 0x04
   Syntax
   void OnUpdateContextMenu(short winID);
The UpdateContextMenu syntax has these parts:
| Part | Description | 
| winID | A short integer containing the window ID of the banner containing the menu. | 
   Remarks
   The context menu is the menu that 
   appears when you right click on the control. You can turn it on or 
   off by setting the ContextMenuEnabled 
   property. The context menu is initially empty; you add your preferred 
   menu items to it using the ContextMenuItem methods.
The menuID parameter indicates whether to address the main context menu or a submenu. The menuID of the main context menu is always 0. The menuID of a submenu is returned when the submenu is created with AppendContextMenuSubmenu or InsertContextMenuSubmenu. Note that this menuID has no relation to any ID used by the Windows API.
Upon receiving the UpdateContextMenu event, you can use SetContextMenuItemChecked, SetContextMenuItemEnabled or SetContextMenuItemText to update the menu item.
See Also: ContextMenu ContextMenuEnabled SetContextMenuItemChecked SetContextMenuItemEnabled SetContextMenuItemText
Back to: Alert Events