Compartilhar via


Memory Device Contexts (Windows CE 5.0)

Send Feedback

A memory DC stores images in memory before sending them to an output device. This allows you to treat a portion of memory as a virtual device.

Create a memory DC for a device by calling the CreateCompatibleDC function and supplying a handle to the DC of the device.

When you call CreateCompatibleDC, Windows CE creates a temporary monochrome bitmap that is 1 pixel by 1 pixel. Then it selects the bitmap into the DC.

Before you begin drawing with this DC, use SelectObject to select a bitmap with the appropriate width and height into the DC. Then you can use the DC to store images.

Windows CE does not support writable memory DCs. The functionality described here is for use in loading bitmaps and transferring them to surfaces in DirectDraw.

See Also

Working with Graphics Devices | Graphic Objects and Modes | Working with DirectDraw Surfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.