pDC->SetROP2( R2_NOTXORPEN ); CPen red; red.CreatePen( PS_SOLID, 1, RGB( 255, 0, 0 ) ); pDC->SelectObject( &red ); for( int i=0; i<100; i++) { pDC->Rectangle( 10+i, 10, 100+i, 100 ); Sleep( 50 ); pDC->Rectangle( 10+i, 10, 100+i, 100 ); } pDC->Rectangle( 10+i, 10, 100+i, 100 );