This document is archived and information here might be outdated. Recommended version. |
Occurs when the menu that contains the multiItem is about to be displayed.
[Visual Basic .NET] Public Function OnPopup ( _ ByVal Hook As Object _ ) As Integer
[C#] public int OnPopup ( object Hook );
[C++]
HRESULT OnPopup(
IDispatch* Hook
);
[C++]
Parameters Hook [in]
Hook is a parameter of type IDispatch
hook is a reference to an IApplication object.
The OnPopup method occurs just before the menu containing the MultiItem is displayed. OnPopup provides a hook to the application object that instantiated the MultiItem and is also used to set the number of items in the MultiItem.
When implementing IMultiItem to create a custom multiItem, use the OnPopup method to get a hook to the application. Also, write code to determine how many items will make up this multiItem and return that number using IMultiItem_OnPopup.