GreGetDefaultAttributes: Difference between revisions
Appearance
Created page with "GreGetDefaultAttributes returns the default values of the attributes indicated in flAttrsMask. This function is supported by the graphics engine. ==Syntax== GreGetDefault..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
GreGetDefaultAttributes returns the default values of the attributes indicated in flAttrsMask. | GreGetDefaultAttributes returns the default values of the attributes indicated in flAttrsMask. | ||
This function is supported by the graphics engine. | This function is supported by the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreGetDefaultAttributes(hdc, lPrimType, flAttrsMask, pAttrs, pInstance, lFunction) | GreGetDefaultAttributes(hdc, lPrimType, flAttrsMask, pAttrs, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;lPrimType (LONG) - input:Bundle primitive type. | ||
:Indicates the bundle type. Valid primitive values are: | |||
;lPrimType (LONG) - input | ::PRIM_LINE: Line attribute bundle | ||
:Bundle primitive type. | ::PRIM_CHAR: Character attribute bundle | ||
::PRIM_MARKER: Marker attribute bundle | |||
:Indicates the bundle type. Valid primitive values are: | ::PRIM_AREA :Pattern attribute bundle | ||
::PRIM_IMAGE: Image attribute bundle | |||
: | ;flAttrsMask (ULONG) - input:Attribute mask. | ||
:Specifies the attributes to be returned corresponding to each attribute in the bundle record. For each set bit, the engine returns the corresponding attribute values and default mask bits. | |||
: | ;pAttrs (PBUNDLE) - input:Pointer to the fixed format bundle record containing the attributes returned. | ||
;pInstance (PVOID) - input:Pointer to instance data. | |||
: | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreGetDefaultAttributes. | ||
: | |||
: | |||
;flAttrsMask (ULONG) - input | |||
:Attribute mask. | |||
:Specifies the attributes to be returned corresponding to each attribute in the bundle record. For each set bit, the engine returns the corresponding attribute values and default mask bits. | |||
;pAttrs (PBUNDLE) - input | |||
:Pointer to the fixed format bundle record containing the attributes returned. | |||
;pInstance (PVOID) - input | |||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreGetDefaultAttributes. | |||
==Return Code== | ==Return Code== | ||
;rc (BOOL) - returns | ;rc (BOOL) - 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, ATTRS_ERROR. | ||
:This function returns the default attribute bit mask. Only bits with corresponding set bits in flAttrsMask are updated. Otherwise, this function returns the error, ATTRS_ERROR. | |||
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation. | :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 | |||
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation. | |||
==Sample Code== | ==Sample Code== |
Latest revision as of 04:47, 24 March 2020
GreGetDefaultAttributes returns the default values of the attributes indicated in flAttrsMask.
This function is supported by the graphics engine.
Syntax
GreGetDefaultAttributes(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 corresponding to each attribute in the bundle record. For each set bit, the engine returns the corresponding attribute values and default mask bits.
- pAttrs (PBUNDLE) - input
- Pointer to the fixed format bundle record containing the attributes returned.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreGetDefaultAttributes.
Return Code
- rc (BOOL) - 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, ATTRS_ERROR.
- 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
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Sample Code
#define INCL_GRE_DEVSUPPORT #include <os2.h> HDC hdc; /* Device context handle. */ LONG lPrimType; /* Bundle primitive type. */ ULONG flAttrsMask; /* Attribute mask. */ PBUNDLE pAttrs; PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; BOOL rc; rc = GreGetDefaultAttributes(hdc, lPrimType, flAttrsMask, pAttrs, pInstance, lFunction);