GreGetAttributes

This function returns the current value of the attributes indicated in flAttrsMask.

This function is supported by the graphics engine.

Syntax
GreGetAttributes(hdc, lPrimType, 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


 * flAttrsMask (ULONG) - input:Attribute mask.
 * Specifies the attributes to be returned. This mask contains a bit corresponding to each attribute in the bundle record. For each set bit, the graphics engine returns the corresponding attribute values and default mask bits.


 * pAttrs (PBUNDLE) - input:The returned attribute value (bundle).
 * Pointer to the fixed format bundle record containing the attributes returned. The only fields that are updated are those whose corresponding flags in flAttrsMask have been set.


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

Return Code

 * rc (LONG) - returns:This function returns the default attribute bit mask. Only bits with corresponding set bits in flAttrsMask are updated. Otherwise, this function returns the error, GPI_ALTERROR.

Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:
 * PMERR_HDC_BUSY
 * PMERR_INV_HDC

Remarks
When a specified attribute is currently set to its default value, the corresponding flag in the returned defaults mask is set and the returned value for this attribute is undefined.

The graphics engine either:
 * Returns the value of each specified attribute and resets the corresponding bit in the returned mask, or
 * Sets the bit in the returned mask to indicate that the specified attribute is set to its default. Note that the corresponding value in the attribute buffer is not valid and is likely to have been overwritten by the engine.