This document is archived and information here might be outdated.  Recommended version.


IHookHelper.ActiveView Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Controls)  

IHookHelper.ActiveView Property

Active view of hooked control or application.

[Visual Basic .NET]
Public ReadOnly Property ActiveView As IActiveView
[C#]
public IActiveView ActiveView {get;}
[C++]
HRESULT get_ActiveView(
  IActiveView** ppActiveView
);
[C++]

Parameters ppActiveView [out, retval]
ppActiveView is a parameter of type IActiveView

Product Availability

Available with ArcGIS Engine.

Description

The IActiveView of the hook passed to the ICommand::OnCreate event. The ActiveView is returned regardless of whether the hook is a MapControl, PageLayoutControl, ToolbarControl (with a 'buddy' MapControl or PageLayoutControl) or ArcMap.

Errors Returned

1058 800A0422: The supplied hook does not implement ICommandHook. 

1059 800A0423: The supplied hook is not a valid object. 

1060 800A0424: The supplied hook is not valid. 

1061 800A0425: IARPageLayout::get_InternalObject failed. 

1062 800A0426: IARMap::get_InternalObject failed. 

See Also

IHookHelper Interface

.NET Samples

Custom map navigation commands (Code Files: Pan) | Add a custom bookmarks MultiItem to the ToolbarControl (Code Files: SpatialBookmarks) | Implementing a property page for an ArcGIS Engine application (Code Files: FeatureLayerSymbology)