ArcObjects Library Reference (Controls)  

IHookHelper.Hook Property

Hook object that should be the same as the hook object passed in ICommand::OnCreate.

[Visual Basic .NET]
Public Property Hook As Object
[C#]
public object Hook {get; set;}
[C++]
HRESULT get_Hook(
  IDispatch** ppHook
);
[C++]
HRESULT putref_Hook(
  IDispatch* ppHook
);
[C++]

Parameters

ppHook [out, retval]   ppHook is a parameter of type IDispatch* ppHook [in]   ppHook is a parameter of type IDispatch*

Product Availability

Available with ArcGIS Engine.

Description

The hook that is passed to the ICommand::OnCreate event. The hook is a MapControl, PageLayoutControl, ToolbarControl or ArcMap.

Errors Returned

1051 800a041b: The supplied hook is not valid - a menu hook must support IToolbarControl or IToolbarBuddy

See Also

IHookHelper Interface

.NET Samples

Add a custom bookmarks MultiItem to the ToolbarControl (Code Files: SpatialBookmarks) | Create a geoprocessing tool to buffer a layer and retrieve messages (Code Files: BufferDlg) | Dynamic biking (Code Files: BikingTrackModeCmd DynamicBikingSpeedCmd) | Tabbed feature inspector (Code Files: AttachTabbedInspectorExtensionCommand) |

.NET Related Topics

How to create dynamic menu commands using a MultiItem | Using the control commands |