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


IScreenDisplay.DrawCache Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Display)  

IScreenDisplay.DrawCache Method

Draws the specified screen cache to the specified window device context. Pass an empty rectangle to copy the full bitmap to the DC origin.

[Visual Basic .NET]
Public Sub DrawCache ( _
    ByVal hDC As Integer, _
    ByVal index As Short, _
    ByRef deviceRect As tagRECT, _
    ByRef cacheRect As tagRECT _
)
[C#]
public void DrawCache (
    int hDC,
    short index,
    ref tagRECT deviceRect,
    ref tagRECT cacheRect
);
[C++]
HRESULT DrawCache(
  long hDC,
  short index,
  tagRECT* deviceRect,
  tagRECT* cacheRect
);
[C++]

Parameters hDC [in] hDC is a parameter of type long index [in] index is a parameter of type short deviceRect [in]
deviceRect is a parameter of type tagRECT cacheRect [in]
cacheRect is a parameter of type tagRECT

Product Availability

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

Remarks

Redrawing data from scratch is time consuming compared to drawing data that has been cached in an off-screen bitmap.  If a particular cache return FALSE for IsCacheDirty, use DrawCache to instantly redraw the bitmap. 

Use the CacheMemDC property to get the desired cache's hDC.

See Also

IScreenDisplay Interface

.NET Related Topics

Display events