ArcObjects Library Reference (Display)  

IScreenDisplay.StopRecording Method

Stops recording to the recording cache.

[Visual Basic .NET]
Public Sub StopRecording ( _
public void StopRecording (
HRESULT StopRecording(

Product Availability

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


In addition to the caches clients create, the ScreenDisplay object also provides a recording cache that accumulates all drawing that happens on the display.  This recording cache is used to redraw the application when the application is moved or exposed or when drawing rubber banding.

Note, StartRecording and StopRecording are exposed for developers creating custom applications that draw from multiple caches and need to refresh quickly.  If you are working with ArcMap or even the Map object, leave all cache management up to the Map.

Use StartRecording to let the display know exactly what to record.  Use DrawCache(esriScreenRecording) to display the recording cache.  Use CacheMemDC(esriScreenRecording) to get a handle to the memory device context for the recording bitmap.

The following C++ code excerpt is a drawing sequence example that uses StartRecording.

VARIANT_BOOL isCacheDirty;
m_ipScreen->IsCacheDirty(esriScreenRecording, &isCacheDirty);

if (isCacheDirty) // draw from scratch
  m_ipScreen->StartDrawing((OLE_HANDLE)hPaintDC, esriNoScreenCache);
  else // draw from offscreen bitmap
  m_ipScreen->DrawCache((OLE_HANDLE)hPaintDC, esriScreenRecording, 0, 0);

See Also

IScreenDisplay Interface