Object Management

When Windows calls the Enable function the first time, a graphics driver should initialize the members of the GDIINFO structure that contain information about brushes, pens, fonts, and bitmaps that the device supports. The following table identifies these members and their purpose:

GDIINFO member

Purpose

dpNumBrushes

Specifies the number of brushes supported by device.

dpNumPens

Specifies the number of pens supported by device.

dpNumFonts

Specifies the number of fonts supported by device.

dpRaster

Specifies whether or not device bitmaps are supported by the device. The RC_DEVBITS value should be set if device bitmaps are supported.


Depending on the type of resident objects, a graphics driver should support as many as three object management functions: EnumDFonts, EnumObj, and RealizeObject. The EnumDFonts function returns information about device fonts. The EnumObj function returns information about device pens and brushes. The RealizeObject function creates or deletes a pen, brush, font, or bitmap.

If a device provides onboard fonts, the driver should set the dpNumFonts member of the GDIINFO structure and support the EnumDFonts function. If a device provides onboard pens and brushes, the driver should set the dpNumPens and dpNumBrushes members of the GDIINFO structure and support the EnumObj function. If a device supports onboard bitmaps, the driver should set the RC_DEVBITS value for the dpRaster member of the GDIINFO structure. If a device provides onboard fonts, pens, brushes, or bitmaps, it must support the RealizeObject function in addition to the other functions described in this paragraph.

See also Enable, GDIINFO, EnumDFonts, RealizeObject