Same problem i faced yesterday and fixed it. In my case i was creating a DISPLAY DC and one Compatible DC and one Bitmap memory through CreateDIBSection API call. hdc = CreateDC("DISPLAY",NULL,NULL,NULL); Bitmap = CreateDIBSection(hdc, pBMI, DIB_RGB_COLORS, (void**)&m_pVideoBits, 0, 0); HDC hSrcDC = CreateCompatibleDC(hdc); SelectObject(hSrcDC, m_hViewfinderBitmap); while Deleting the Bitmap and DC you should follow the following way DeleteDC(hSrcDC); DeleteObject(Bitmap); DeleteDC(hdc); If your code also have some this kind of thing then please take care that, you should not clean a bitmap untill it is attached to the DC Hope i could help you some way. Regards Anil Kumar