ArcObjects Library Reference (Carto)  

IActiveView.ScreenCacheID Property

The screen cache ID that is used to draw the specified phase. .

[Visual Basic .NET]
Public Function get_ScreenCacheID ( _
    ByVal phase As esriViewDrawPhase, _
    ByVal Data As Object _
) As Short
[C#]
public short get_ScreenCacheID (
    esriViewDrawPhase phase,
    object Data
);
[C++]
HRESULT get_ScreenCacheID(
  esriViewDrawPhase phase,
  LPUNKNOWN Data,
  short* cacheID
);
[C++]

Parameters

phase [in]

  phase is a parameter of type esriViewDrawPhase

Data [in]   Data is a parameter of type LPUNKNOWN cacheID [out, retval]   cacheID is a parameter of type short

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

This property is widely used during invalidation (refresh) operations.  For example, IScreenDisplay::Invalidate requires a cacheIndex.  Use this property to get the cacheIndex for the desired draw phase you wish to refresh.  The valid draw phases are held in the esriViewDrawPhase enumeration.

Use the data parameter to invalidate just a specific piece of data.  For example, if a layer is loaded and its cache property is set to TRUE, this layer alone can be invalidated.  A tracking layer is a good example of this.

[C++]

See Also

IActiveView Interface | esriViewDrawPhase Constants | IActiveView.PartialRefresh Method | esriViewDrawPhase Constants | IActiveView.ScreenCacheID Property | IActiveView.Refresh Method | IScreenDisplay.Invalidate Method