Helps commands work with the GlobeControl, ArcGlobe, custom controls and applications.
The GlobeHookHelper is designed to help developers write custom commands that will work with some ArcGIS Engine Controls and applications.
When creating a custom command the ICommand::OnCreate event is passed a hook to the control or application that the command will work with. The command needs to determine the type of hook that is passed so it knows how to handle itself. Rather than adding code into the ICommand::OnCreate event to determine the type of hook a GlobeHookHelper object can do this. The GlobeHookHelper is used to hold the hook and return the Globe, GlobeDisplay, ISceneViewer and Camera objects regardless of whether the hook is a GlobeControl, ToolbarControl (with a 'buddy' GlobeControl), the ArcGlobe application or a custom control or application implementing IGlobeCommandHook.
When using the GlobeHookHelper in the ICommand::OnCreate event of custom commands the following must be considered:
Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.
|IConnectionPointContainer||Supports connection points for connectable objects.|
|IGlobeHookHelper||Provides access to members needed when developing commands to work with the GlobeControl, ArcGlobe, and custom controls and applications.|
|IHookActions||Provides access to actions such as flashing, panning and zooming that help in the development of commands to work with controls, custom controls and applications.|
|ISupportErrorInfo||Indicates whether a specific interface can return Automation error objects.|
|IHookHelperEvents (default)||Provides access to events that occur when the state of a hook changes.|
When working with GlobeHookHelper's default outbound interface in Visual Basic 6 declare variables as follows:
Private WithEvents pGlobeHookHelper as GlobeHookHelper