Share via


Graphic Objects and Modes

Send Feedback

All new DCs have default graphic objects. Call the GetCurrentObject and GetObject functions to examine the attributes of a graphic object. GetCurrentObject returns a handle identifying the current attribute, and GetObject initializes a structure containing the attributes of that object.

Each of these functions returns a handle identifying the new graphic object. After you retrieve a handle, call the SelectObject function to select the new object into the DC. Save the handle to the currently selected object.

If SelectObject succeeds, it returns a handle to the object being replaced in the DC. When you are finished with the new object, use SelectObject to restore the previously selected object and the DeleteObject function to delete the new object. Be sure to delete all objects that are no longer in use.

GetDeviceCaps provides information about the following rendering capabilities of a device:

  • Shape
  • Text and line-drawing
  • Color
  • Raster

Supply GetDeviceCaps with a handle to a device context and an index specifying the type of data to be retrieved.

Windows CE initializes a DC with default graphic modes. Use the GetBkMode function to get the current background mix mode and the SetBkMode function to set it.

See Also

Working with Graphics Devices | Memory Device Contexts | Working with DirectDraw Surfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.