hi, below is my on draw...
it works fine as below...
Code:
void CEditorView::OnDraw(CDC* dc)
{
	CMemDC pDC(dc);
	OnPrepareDC(pDC);
    	CEditorDoc* pDoc = GetDocument();
    	ASSERT_VALID(pDoc);
    	// TODO: add draw code for native data here - use pDC 
     	//as the device context to draw to
	
	//
	//Set the mapping mode to LOENGLISH
	//
	pDC->SetMapMode(MM_LOENGLISH);

	//
	//Convert arguments to coordinates to MM_LOENGLISH units.
	//
	CSize szTemp;
	szTemp.cx = pDoc->GetGridX();
	szTemp.cy = pDoc->GetGridY();
	pDC->DPtoLP(&szTemp);


	//
	// then draw the grid lines
	//
	CRect clipBoxRect;
	pDC->GetClipBox(&clipBoxRect);
	for(int x = 10 ; x <= pDoc->GetGridX() ; x += 10) {
		pDC->MoveTo(x, -10);
		pDC->LineTo(x, -pDoc->GetGridY());
	}
	
	for(int y = -10 ; y >= -pDoc->GetGridY() ; y -=10) {
		pDC->MoveTo(10, y);
		pDC->LineTo(pDoc->GetGridX(), y);
	}
}
it works perfectly fine as below....
now the problem is i wanan add this to my above code
Code:
	//
	//Draw the squares
	//
	/*for(int i = 0 ; i < 500 ; i ++) {
		for(int j = 0 ; j < 750 ; j ++) {
			COLORREF color = pDoc->GetSquareColor(i, j);
			CBrush brush(color);
			int x1 = (j * 10) + 10;
			int y1 = (i * -10) - 10;
			int x2 = x1 + 10;
			int y2 = y1 - 10;
			CRect rect(x1, y1, x2, y2);
			pDC->FillRect(rect, &brush);
		}
	}*/
when i do this...
all the processing power of the processor is eaten up by the processor....
can someone pls tell me a solution by which i can incorporate the above code to my View's OnDraw such that i can still retain my processing power????
tks a lot...