In the OnPaint() function:
      CDC *dc=GetDC(NULL);//this dc is the Desktop DC
then using the dc,you could do what you could !
      ie.
      CBrush brush;
      brush.CreateSolidBrush(RGB(0,0,0));
      dc->FillSolidRect(...);
but considering you don't want the desktop is destroyed ,you could store the desktop before you take your actions!