Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Windows Embedded CE provides several methods for obtaining a device context handle, depending on whether the device is a display, printer, or memory device.

You use a display device context to draw in the client area of a screen.

You use a memory device context to store bitmapped images in memory rather than sending it to an output device. A memory device context enables Windows Embedded CE to treat a portion of memory as a virtual device.

You use a printer device context to send output to a printer.

It is important when using a device context that you release or delete it when it is no longer in use. Releasing a device context frees the device for use by other applications.

Note:
Failure to delete objects no longer in use can significantly affect performance.

See Also