Fires when the hook object or one of its properties has been replaced or updated.
[Visual Basic 6.0] Event OnHookUpdated(
ByVal hookEvent As esriHookHelperEvents _
)
[Visual Basic .NET] Public Event OnHookUpdated As OnHookUpdatedEventHandler
[C#] public event OnHookUpdatedEventHandler OnHookUpdated
[C++]
HRESULT OnHookUpdated(
esriHookHelperEvents hookEvent
);
[C++]Parameters
hookEvent [in]hookEvent is a parameter of type esriHookHelperEvents
Product Availability
Description
Fires when a change has been made to either a HookHelper, GlobeHookHelper or SceneHookHelper.
In a command implementation using the HookHelper, use the event to re-synch any member variables storing the IHookHelper::ActiveView, IHookHelper::FocusMap, IHookHelper::PageLayout or IHookHelper::OperationStack and to re-synch any event listeners (for example, if listening to IActiveViewEvents).
OnHookUpdated will fire in response to the following in an ArcGIS Engine application:
- IToolbarControlEvents::OnBuddyChanged
- IMapControlEvents2::OnMapReplaced
- IPageLayoutControlEvents::OnPageLayoutReplaced
- IPageLayoutControlEvents::OnFocusMapChanged
OnHookUpdated will fire in response to the following in the ArcMap application:
- IDocumentEventsDisp::ActiveViewChanged
- IDocumentEventsDisp::MapsChanged
- IDocumentEventsDisp::NewDocument
- IDocumentEventsDisp::OpenDocument
- IDocumentEventsDisp::CloseDocument
- Setting the IHookHelper::Hook property
In a command implmentation using the GlobeHookHelper, use the event to re-synch any member variables storing the IGlobeHookHelper::Hook, IGlobeHookHelper::ActiveViewer, IGlobeHookHelper::Camera, IGlobeHookHelper::Globe or IGlobeHookHelper::GlobeDisplay and to re-synch any event listeners (for example, if listening to IActiveViewEvents).
OnHookUpdated will fire in response to the following in an ArcGIS Engine application:
OnHookUpdated will fire in response to the following in the ArcGlobe application:
- IGMxDocumentEventsDisp::NewDocument
- IGMxDocumentEventsDisp::OpenDocument
- IGMxDocumentEventsDisp::CloseDocument
- Setting the IGlobeHookHelper::Hook property
In a command implementation using the SceneHookHelper, use the event to re-synch any member variables storing the ISceneHookHelper::Hook, ISceneHookHelper::ActiveViewer, ISceneHookHelper::Camera, ISceneHookHelper::Scene, ISceneHookHelper::SceneGraph any event listeners (for example, if listening to IActiveViewEvents ).
OnHookUpdated will fire in response to the following in an ArcGIS Engine application:
OnHookUpdated will fire in response to the following in the ArcScene application:
- ISxDocumentEventsDisp::NewDocument
- ISxDocumentEventsDisp::OpenDocument
- ISxDocumentEventsDisp::CloseDocument
- Setting the ISceneHookHelper::Hook property
Remarks
The following are recommended when using the HookHelper, GlobeHookHelper or SceneHookHelper in cutsom commands:
- Where possible avoid storing member variables to IHookHelper::ActiveView, IHookHelper::FocusMap, IHookHelper::PageLayout or IHookHelper::OperationStack. Instead store one member variable to the HookHelper object, and use the HookHelper to return the latest object.
- Where possible avoid storing member variables to IGlobeHookHelper::ActiveViewer, IGlobeHookHelper::Camera, IGlobeHookHelper::Globe or IGlobeHookHelper::GlobeDisplay . Instead store one member variable to the GlobeHookHelper object.
- Where possible avoid storing member variables to ISceneHookHelper::ActiveViewer, ISceneHookHelper::Camera, ISceneHookHelper::Scene, ISceneHookHelper::SceneGraph . Instead store one member variable to the SceneHookHelper object.
- Programmatically handle the abscene of an ActiveView, PageLayout, Map, Scene or Globe by setting the ICommand::Enabled property to false.