This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IC > ICommandPoolEdit Interface > ICommandPoolEdit.SetHook Method (ArcObjects .NET 10.5 SDK) |
Sets the object that is passed as a hook to the OnCreate method on the 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*
Pass the SetHook method an IDispatch object, typically the ToolbarControl, that is passed as a hook to the ICommand::OnCreate method of each command in the CommandPool.