BeginWaitCursor();
GetClientRect(rc);
dcMemory.CreateCompatibleDC(pDC);
bmp.CreateCompatibleBitmap(pDC,rc.Width(),rc.Height());
dcMemory.SelectObject(&bmp);
short iCount = pDoc->m_MapLayers.GetCount();
for ( short i = 0 ; i < iCount ; i++ )
{
pLayer = pDoc->m_MapLayers.GetAt(i);
pLayer->DrawLayer(&dcMemory , m_DrawParam );