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.

Description

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.

Members

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

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

.NET Related Topics

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