Hi everybody,
I've a problem using CmemDC class, i'm writing text in overlay over a
image which is updated every second, in order to avoid flickering I
used CmemDC and that works very well, but if I Release the DC I get a
blank image, what's wrong with that?
The problem is that if I don't release the DC the memory increases.
bool CImageHandler_Dyn:raw_IMG_Wri(BYTE* pBuffer)
HDC hDC = ::GetDC( m_hwnd ) ;
CMemDC ppDC(CDC::FromHandle(hDC));
m_OCDib->Draw( ppDC , &rcDst , &rcSrc ); //write image on DC
ppDC->SetTextColor(RGB(55, 89, 255));
ppDC->SetTextAlign(TA_LEFT | TA_TOP);
ppDC->TextOut(0, 0, "Ciao");
::ReleaseDC( m_hwnd , hDC ) ; //without this it works perfectly

Thanks for any advice