This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IT > IToolbarMenu Interface > IToolbarMenu.SetHook Method (ArcObjects .NET 10.4 SDK) |
Sets the object that is passed as a hook to the OnCreate event of each item's command.
[Visual Basic .NET] Public Sub SetHook ( _ ByVal pHook As Object _ )
[C#] public void SetHook ( object pHook );
[C++]
HRESULT SetHook(
IDispatch* pHook
);
[C++]
Parameters pHook [in] pHook is a parameter of type IDispatch*
The Hook is a shortcut to ICommandPoolEdit::Hook on the CommandPool. If the ToolbarMenu is an item on the ToolbarControl the Hook is shared and initialized by the ToolbarControl. If the ToolbarMenu is a standalone popup menu use the SetHook method, and optionally share the CommandPool with an existing one within the application.