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

In Windows Embedded CE, the graphics device interface (GDI) controls the display of text and graphics. GDI provides several functions and structures you can use to generate graphic output for displays, printers, and other devices. Using GDI functions, you can draw lines, curves, closed figures, text, and bitmapped images. The color and style of the items you draw depends on the drawing objects you create. GDI provides three drawing objects you can use to create graphics: pens to draw lines and curves, brushes to fill the interiors of closed figures, and fonts to write text.

The Windows Embedded CE GDI is designed for devices with limited system resources. Therefore, it does not include many of the special graphic functions found in Windows-based desktop systems. As a consequence, the Windows Embedded CE GDI is a powerful, full-color graphics display system with a small footprint.

Applications direct output to a specified device by creating a device contextfor the device. The device context is a GDI-managed structure containing information about the device. An application creates a device context by calling device context functions. GDI returns a device context handle used to identify the device.

Applications can direct output to a physical device, such as a display or printer, or to a logical device, such as a memory device.

A device context also contains attributes that determine how GDI functions interact with a device. These attributes eliminate the need to specify every piece of information Windows Embedded CE requires to display an object on a device. If you want to change an attribute, you can use attribute functions to change current device settings and operating modes. Operating modes include text and background colors and the mixing mode that specifies how colors in a pen or brush combine with colors already on a display surface.

See Also

Reference

GDI Reference

Other Resources

GWES Application Development