GreSetAttributes

GreSetAttributes sets the attributes for the specified primitive type according to the flags set in flDefsMask and flAttrsMask.

This function is supported by the graphics engine.

Syntax
GreSetAttributes(hdc, lPrimType, flDefsMask, flAttrsMask, pAttrs, pInstance, lFunction)

Parameters

 * hdc (HDC) - input : Device context handle.
 * lPrimType (LONG) - input : Bundle primitive type.
 * Indicates the bundle type. Valid primitive values are:


 * PRIM_LINE Line attribute bundle
 * PRIM_CHAR Character attribute bundle
 * PRIM_MARKER Marker attribute bundle
 * PRIM_AREA Pattern attribute bundle
 * PRIM_IMAGE Image attribute bundle
 * flDefsMask (ULONG) - input : Flags indicating the attributes to be set to default.
 * flAttrsMask (ULONG) - input : Flags indicating the attributes to be modified.
 * pAttrs (PBUNDLE) - input : Pointer.
 * This is a pointer to the fixed format-bundle record containing the attribute values to be set as specified by flAttrsMask. Only the attribute fields corresponding to attribute flags set in flAttrsMask, and not set in flDefsMask, contain valid values.
 * This buffer need only be large enough to contain data for the highest offset attribute referenced.


 * pInstance (PVOID) - input : Pointer to instance data.
 * lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreSetAttributes.

Returns

 * rc (BOOL) - returns : Return codes.
 * On completion, the handling routine must return BOOLEAN (fSuccess).

Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include: Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
 * TRUE Successful
 * FALSE Error
 * PMERR_COORDINATE_OVERFLOW
 * PMERR_DEV_FUNC_NOT_INSTALLED
 * PMERR_EXCEEDS_MAX_SEG_LENGTH
 * PMERR_HDC_BUSY
 * PMERR_HUGE_FONTS_NOT_SUPPORTED
 * PMERR_INSUFFICIENT_MEMORY
 * PMERR_INV_BACKGROUND_COL_ATTR
 * PMERR_INV_BACKGROUND_MIX_ATTR
 * PMERR_INV_CHAR_DIRECTION_ATTR
 * PMERR_INV_CHAR_MODE_ATTR
 * PMERR_INV_CHAR_SET_ATTR
 * PMERR_INV_CHAR_SHEAR_ATTR
 * PMERR_INV_CODEPAGE
 * PMERR_INV_COLOR_ATTR
 * PMERR_INV_COORD_SPACE
 * PMERR_INV_GEOM_LINE_WIDTH_ATTR
 * PMERR_INV_HDC
 * PMERR_INV_IN_AREA
 * PMERR_INV_LENGTH_OR_COUNT
 * PMERR_INV_LINE_END_ATTR
 * PMERR_INV_LINE_JOIN_ATTR
 * PMERR_INV_LINE_TYPE_ATTR
 * PMERR_INV_LINE_WIDTH_ATTR
 * PMERR_INV_MARKER_SET_ATTR
 * PMERR_INV_MARKER_SYMBOL_ATTR
 * PMERR_INV_MIX_ATTR
 * PMERR_INV_PATTERN_REF_PT_ATTR
 * PMERR_INV_PATTERN_SET_ATTR
 * PMERR_INV_PATTERN_SET_FONT
 * PMERR_INV_PRIMITIVE_TYPE
 * PMERR_INV_SETID
 * PMERR_UNSUPPORTED_ATTR
 * PMERR_UNSUPPORTED_ATTR_VALUE

Sample

 * 1) define INCL_GRE_DEVSUPPORT
 * 2) include 

HDC       hdc;          /*  Device context handle. */ LONG      lPrimType;    /*  Bundle primitive type. */ ULONG     flDefsMask;   /*  Flags indicating the attributes to be set to default. */ ULONG     flAttrsMask;  /*  Flags indicating the attributes to be modified. */ PBUNDLE   pAttrs;       /*  Pointer. */ PVOID     pInstance;    /*  Pointer to instance data. */ ULONG     lFunction;    /*  High-order WORD=flags; low-order WORD=NGreSetAttributes. */ BOOL      rc;           /*  Return codes. */

rc = GreSetAttributes(hdc, lPrimType, flDefsMask,      flAttrsMask, pAttrs, pInstance, lFunction);

Remarks
Note that: When GreSetAttributes occurs within a path bracket, it must not be used to set the geometric line width for line attributes, nor used to set the foreground and background colors and mixes for character and marker attributes.
 * Only attributes whose flags are set in flAttrsMask are modified.
 * Attributes whose flags are set in both flDefsMask and flAttrsMask are set to their default values.
 * Attributes whose flags are set only in flDefsMask, or whose flags are not set either in flDefsMask or flAttrsMask, are unchanged.
 * Attributes whose flags are set only in flAttrsMask are set to the value specified by pAttrs.