I managed to fix it by replacing the show function with:
CRect rcPaint;
this->GetClientRect(rcPaint);
CDC *pDCOld = m_pMemDC->GetDC(this, TRUE);
CDC pDCTemp;
pDCTemp.CreateCompatibleDC(pDCOld);
CMemDC memDC(pDCTemp, rcPaint);
CDC* pDC = &memDC.GetDC();
pDC->BitBlt(rcPaint.left, rcPaint.top, rcPaint.Width(), rcPaint.Height(), pDCOld,
rcPaint.left, rcPaint.top, SRCCOPY);
Invalidate();
The object this refers to the current CView object. This works but it's slightly unresponsive.