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


IScreenDisplay.DrawCache Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Display > ESRI.ArcGIS.Display > Interfaces > IS > IScreenDisplay Interface > IScreenDisplay.DrawCache Method
ArcGIS Developer Help

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(
  OLE_HANDLE hDC,
  short index,
  tagRECT* deviceRect,
  tagRECT* cacheRect
);
[C++]
Parameters
hDC [in]

hDC is a parameter of type OLE_HANDLE 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