IHookHelper Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IH > IHookHelper Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Controls)  

IHookHelper Interface

Provides access to members needed when developing commands to work with the MapControl, PageLayoutControl, ArcMap, and custom controls and applications.

Product Availability

Available with ArcGIS Engine.


Use the IHookHelper interface to return the ActiveView, PageLayout or FocusMap of the hook passed to the ICommand::OnCreate event regardless of whether the hook is a MapControl, PageLayoutControl, ToolbarControl or ArcMap.


Name Description
Read-only property ActiveView Active view of hooked control or application.
Read-only property FocusMap Focus map of hooked control or application.
Read/write property Hook Hook object that should be the same as the hook object passed in ICommand::OnCreate.
Read-only property OperationStack Operation stack of hooked control or application used for undo/redo operations.
Read-only property PageLayout Page layout of hooked control or application.

CoClasses that implement IHookHelper

CoClasses and Classes Description
HookHelper Helps commands work with the MapControl, PageLayoutControl, ArcMap, custom controls and applications.

.NET Samples

Custom map navigation commands (Code Files: FixedZoomIn FixedZoomOut FullExtent GoBackToPreviousExtent GoToNextExtent Pan PanDown PanLeft PanRight PanUp ZoomIn ZoomOut) | Dynamic logo (Code Files: DynamicLogo) | Dynamic display animated zoom (Code Files: AnimatedZoomInTool AnimatedZoomOutTool) | Editing using a custom form (Code Files: EditCmd) | Dynamic biking (Code Files: BikingTrackModeCmd DynamicBikingCmd DynamicBikingSpeedCmd) | Dynamic display layer (Code Files: AddMyDynamicLayerCmd) | Add a custom bookmarks MultiItem to the ToolbarControl (Code Files: CreateBookmark SpatialBookmarks) | Create a geoprocessing tool to buffer a layer and retrieve messages (Code Files: BufferDlg BufferSelectedLayerCmd) | Custom map selection commands (Code Files: ClearFeatureSelection SelectFeatures) | Tabbed feature inspector (Code Files: AttachTabbedInspectorExtensionCommand) | Updating the purge rule on a real-time temporal layer (Code Files: TAPurgeRuleCmd) | Simple point plug-in data source (Code Files: AddSimplePointLayerCmd OpenSimplePointDlg) | Synchronized MapControl and PageLayoutControl application (Code Files: OpenNewMapDocument) | Dynamic display´┐Żtracking dynamic object (Code Files: TrackObject) | Dynamic cache layer manager controller (Code Files: CacheLayerManagerCmd CacheManagerDlg) | GraphicTracker with the map (Code Files: AddGT SelectGT) | Using HookActions in custom commands (Code Files: hookActionsCallout hookActionsFlash hookActionsGraphic hookActionsLabel hookActionsPan hookActionsZoom) | Graphics layers ToolControl (Code Files: GraphicsLayersListToolCtrl NewGraphicsLayerCmd) | Custom vertex editing commands (Code Files: CustomVertexCommands UsingOutOfBoxVertexCommands) | Simple dynamic display application (Code Files: CreateNewDocument LoadDynamicLayerCmd ToggleDynamicDisplayCmd) | RSS weather GraphicTracker (Code Files: AddRSSWeather) | Move a graphic along a path in ArcMap (Code Files: cmdMoveGraphicAlongPath) | Building a MapViewer application using the ArcGIS Engine controls (Code Files: AddDateTool) | Implementing a property page for an ArcGIS Engine application (Code Files: CreateNewDocument FeatureLayerSymbology) | Using the ITAControlUpdate interface (Code Files: TAUpdateControlCommand) | RSS weather layer (Code Files: AddRSSWeatherLayer AddWeatherItemCmd AddWeatherItemTool RefreshLayerCmd RSSLayerProperties SelectByCityName) | Triangle graphic element (Code Files: TriangleElementTool) | Save a layer file in a MapControl application (Code Files: CreateNewDocument LoadLayerFileCmd RemoveLayerCmd SaveLayerFileCmd) | Creating a zoom factor extension that works with a ToolbarControl (Code Files: SetZoomFactor ZoomIn ZoomOut) | Add map surrounds using the SymbologyControl (Code Files: NorthArrows ScaleBars ScaleText) | Schematics Engine application (Code Files: CreateNewDocument) | Temporal statistics (Code Files: CreateNewDocument) | Configure a command for a specific locale (Code Files: CultureCommand)

.NET Related Topics

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