If the device context is currently associated with a presentation space, or if it is created with the WinOpenWindowDC call (that is, it is a screen device context), an error is raised, and the device context is not closed.
If the device context being closed is a memory device context that has a bit map currently selected into it (see "GpiSetBitmap" in the Presentation Manager Programming Reference) the bit map is automatically deselected before the device context is closed.
Any clip region currently in use for this device context is deleted.