~cpp CDC memDC; CBitmap bitmap, *pOldBitmap; CBrush brush; CRect rect; GetClientRect(&rect); brush.CreateSolidBrush(RGB(255,255,255)); memDC.CreateCompatibleDC(pDC); bitmap.CreateCompatibleBitmap(pDC, rect.Width(), rect.Height()); pOldBitmap = memDC.SelectObject(&bitmap); memDC.FillRect(CRect(0,0, rect.right, rect.bottom), &brush); // to do : add draw code with memDC pDC->BitBlt(0, 0, rect.Width(), rect.Height(), &memDC, 0, 0, SRCCOPY); memDC.SelectObject(pOldBitmap);