ContextMenu Event (Alert Control)
Windows - Visual C++
Description
The ContextMenu event is fired when
an item in an Alert Banner's context menu is selected.
DispId 0x03
Syntax
void OnContextMenu(short winID, short menuID, short position);
The ContextMenu syntax has these parts:
Part |
Description |
winID |
A short integer containing the window ID of the banner containing the menu. |
menuID |
A short integer containing the menu ID of the menu containing the selected item. |
position |
A short integer containing the position of the selected menu item. Position is one-based. |
Remarks
The context menu is the menu that
appears when you right click in the background of an Alert Banner.
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.
See Also: AppendContextMenuItem AppendContextMenuSeparator AppendContextMenuSubmenu GetContextMenuItemCount InsertContextMenuItem InsertContextMenuSeparator InsertContextMenuSubmenu RemoveContextMenuItem ContextMenuEnabled UpdateContextMenu
Back to: Alert Events