Partager via


Graphics Device Interface (GDI) (Windows CE 5.0)

Send Feedback

In Microsoft® Windows® 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 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 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 context for 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 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

GWES Application Development | GDI Reference

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.