The DeleteDC member function deletes the Windows device contexts that are associated with m_hDC in the current CDC object. But, An application should not call DeleteDC if objects have been selected into the device context. Objects must first be selected out of the device context before it it is deleted. 以上来自MSDN,如上所诉,你只要把你用 SelectObject
更改过的东东全改回来,就没什么问题了,最后,如果你的memDC是指针的话,delete memDC 就OK了
:)