Hi

I have an MFC dialogbox application where I draw bitmaps after each other making it look like a movie. But the image tears sometimes. Is there a way to make it look better?

This is current code:

Code:
CPaintDC dc(this);
CDC hdcmem;

hdcmem.CreateCompatibleDC(NULL);
CGdiObject *old = hdcmem.SelectObject(&m_bitmap);

dc.StretchBlt(STARTXSTATIC + m_size.cx + 10, STARTYSTATIC, 
	  m_size.cx, m_size.cy / m_nofimages, 
	  &hdcmem, 0, m_curanim * (m_size.cy / m_nofimages), m_size.cx,
	  m_size.cy / m_nofimages, SRCCOPY);

hdcmem.SelectObject(old);