## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreCopyDCLoadData - Remarks

Device-dependent attributes, such as pick aperture, character cell, and marker cell, are copied only when they have been set by the application. Otherwise, the target device defaults are used.

In response to this call, the graphics engine does the following:

Transfers the contents of the source DC's lcid table to the target DC's lcid table.

Translates any bit maps when the devices associated with the source and target DCs are different.

Calls GreCreateLogicalFont for the target DC, as necessary.

Transfers the color table and checks that the resulting color table in the target DC is the same as the one in the source DC.

Resets the source DC using GreResetDC. When the save level of the source DC is not 1, it is restored to the default value before GreResetDC is called. The color table is also reset to the default value.
The values of the GPI handles in the source DC are preserved. This function fails if the target DC lcid table already has lcids set in the range specified. If the target DC does not support LCOL_REALIZABLE (see GreCreateLogColorTable), a warning (PMERR_REALIZE_NOT_SUPPORTED) is raised and the color table is treated as nonrealizable.

This function has the following effect on fonts:

Any logical font in force on the source DC is reloaded onto the target with the original parameters specified by the application.

A generic font selected by Match ID can be selected into the target DC provided that it is suitable. For example, an image font cannot be selected for a hardcopy DC.

Any device font (selected by Match ID) can be selected for the target DC provided that the new device has a font with the same Match ID. If not, the defaults are used. This is managed by the presentation driver. When it is necessary to use a specific font on the new device, the presentation driver should call GreQueryFonts to determine the characteristics and Match ID of the font for the new device and then to reload it.

A warning is raised when it is not possible to reload a font on association (not on reassociation). This warning is one of the following:

PMERR_FONT_NOT_LOADED
PMERR_KERNING_NOT_SUPPORTED

Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.