The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Graphic Objects

The pen, brush, bitmap, palette, region, and path associated with a DC are referred to as its graphic objects. The following attributes are associated with each of these objects.

Graphic objectAssociated attributes
BitmapSize, in bytes; dimensions, in pixels; color-format; compression scheme; and so on.
BrushStyle, color, pattern, and origin.
PaletteColors and size (or number of colors).
FontTypeface name, width, height, weight, character set, and so on.
PenStyle, width, and color.
RegionLocation and dimensions.


When an application creates a DC, the system automatically stores a set of default objects in it (there is no default bitmap or path). An application can examine the attributes of the default objects by calling the GetCurrentObject and GetObject functions. The application can change these defaults by creating a new object and selecting it into the DC. An object is selected into a DC by calling the SelectObject function.

An application can set the current brush color to a specified color value with SetDCBrushColor.

The GetDCBrushColor function returns the DC brush color. The SetDCPenColor function sets the pen color to a specified color value. The GetDCPenColor function returns the DC pen color.