Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
GpiQueryDefAttrs (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIDEFAULTS
BOOL GpiQueryDefAttrs(hps, lPrimType, flAttrMask, pbunAttrs)
HPS hps; /* presentation-space handle */
LONG lPrimType; /* primitive type */
ULONG flAttrMask; /* attributes mask */
PBUNDLE pbunAttrs; /* pointer to structure for default attributes */
The GpiQueryDefAttrs function retrieves the default attributes for a
primitive. The default attributes define the values given to a presentation
space's attributes when that presentation space is reset. The default
attributes also define the value of attributes when they are explicitly set
to the default by using the GpiSetAttrs function.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
lPrimType Specifies which primitive type to retrieve attributes for. It
can be one of the following values:
Value Meaning
────────────────────────────────────────────────────────────────
PRIM_AREA Area primitives
PRIM_CHAR Character primitives
PRIM_IMAGE Image primitives
PRIM_LINE Line and arc primitives
PRIM_MARKER Marker primitives
flAttrMask Specifies which attributes to retrieve. The values for this
parameter depend on the primitive type specified by the
lPrimType parameter. This parameter can be any combination of
the following values for a specific type:
Type Values
────────────────────────────────────────────────────────────────
PRIM_AREA ABB_COLOR, ABB_BACK_COLOR, ABB_MIX_MODE,
ABB_BACK_MIX_MODE, ABB_SET, ABB_SYMBOL,
ABB_REF_POINT
PRIM_CHAR CBB_COLOR, CBB_BACK_COLOR, CBB_MIX_MODE,
CBB_BACK_MIX_MODE, CBB_SET, CBB_MODE, CBB_BOX,
CBB_ANGLE, CBB_SHEAR, CBB_DIRECTION
PRIM_IMAGE IBB_COLOR, IBB_BACK_COLOR, IBB_MIX_MODE,
IBB_BACK_MIX_MODE
PRIM_LINE LBB_COLOR, LBB_MIX_MODE, LBB_WIDTH, LBB_GEOM_WIDTH,
LBB_TYPE, LBB_END, LBB_JOIN
PRIM_MARKER MBB_COLOR, MBB_BACK_COLOR, MBB_MIX_MODE,
MBB_BACK_MIX_MODE, MBB_SET, MBB_SYMBOL, MBB_BOX
If this parameter is zero, the function does not retrieve
attributes but still returns a mask that specifies the
attributes using default values.
pbunAttrs Points to the structure that receives the default attribute
values for each attribute specified by the flAttrMask parameter.
The type of structure depends on the value of the lPrimType
parameter; it can be one of following structures:
Type Structure
────────────────────────────────────────────────────────────────
PRIM_AREA AREABUNDLE
PRIM_CHAR CHARBUNDLE
PRIM_IMAGE IMAGEBUNDLE
PRIM_LINE LINEBUNDLE
PRIM_MARKER MARKERBUNDLE
Return Value
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurs.
Errors
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
PMERR_HUGE_FONTS_NOT_SUPPORTED
PMERR_INV_BACKGROUND_COL_ATTR
PMERR_INV_CHAR_ANGLE_ATTR
PMERR_INV_CHAR_DIRECTION_ATTR
PMERR_INV_CHAR_MODE_ATTR
PMERR_INV_CHAR_SET_ATTR
PMERR_INV_CHAR_SHEAR_ATTR
PMERR_INV_COLOR_ATTR
PMERR_INV_COORDINATE
PMERR_INV_GEOM_LINE_WIDTH_ATTR
PMERR_INV_HPS
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_ATTR
PMERR_INV_PATTERN_SET_ATTR
PMERR_INV_PATTERN_SET_FONT
PMERR_INV_PRIMITIVE_TYPE
PMERR_PS_BUSY
PMERR_UNSUPPORTED_ATTR
PMERR_UNSUPPORTED_ATTR_VALUE
See Also
GpiQueryAttrs, GpiSetDefAttrs, WinGetLastError, AREABUNDLE, CHARBUNDLE,
IMAGEBUNDLE, LINEBUNDLE, MARKERBUNDLE
♦