The correct way to DeletObject
Posted on 2004-04-27
I've read a ton of different info. on how to clean up bitmap objects but alot of the information is different. Can someone explain what the correct method is for cleaning up a GDI object such as a bitmap. I.E.
HDC pDC = ::GetWindowDC(hWnd);
hBitmapDC = ::CreateCompatibleDC(pDC);
HBITMAP hBitmap = ::LoadBitmap(hInst,(LPCTSTR)nResID);
...How do I clean up properly?