xtian79

I can not follow the example about implementing cache

Discussion created by xtian79 on Apr 12, 2011
Hi, I'm a new with arcObjects, i'm trying to follow the examples, but following this one:
http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/How_to_add_display_caching/000100000241000000/

i got lost:
private void Picture1_Paint()
{
if ((m_screenDisplay.IsCacheDirty(esriScreenRecording)))
{
m_screenDisplay.StartRecording();

//Make a call to your Draw function. For example:
MyDraw(m_screenDisplay, Picture1.hDC);

m_screenDisplay.StopRecording();
}
else
{
tagRECT rect;
m_screenDisplay.DrawCache(Picture1.hDC, esriScreenRecording, rect, rect);
}
}


in this code who is picture1? what type? where it should be declare?
besides it looks like esri, is just translating the examples but does not test them, because the variable rect is not instantiated. as the same with esriScreenRecording, it is a variable or a enumeration item?

[C#]
if ((m_screenDisplay.IsCacheDirty((short)esriScreenCache.esriScreenRecording)))
{
m_screenDisplay.StartRecording();
m_draw.StartDrawing(hDC, (short)esriScreenCache.esriNoScreenCache);
DrawContents();
m_draw.FinishDrawing();
m_screenDisplay.StopRecording();
}

else
{
m_screenDisplay.DrawCache(Picture1.hDC, (short)
esriScreenCache.esriScreenRecording, 0, 0);
}


in this snippet, i cant realize who is hDC, neither who is Picture1

Outcomes