If you use SelectObject() catch the return and save until you have finished using the GDI object. Then RETURN the original before using DeleteObject().

Save your GDI resources.

To clear the HDC

BitBlt(hdcScreen, 0, 0, iWidth, iHeight,hdcScreen, 0, 0, WHITENESS);