gpi12.hlp (Table of Contents; Topic list)
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.
GpiSetSegmentAttrs (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPISEGMENTS
 
BOOL GpiSetSegmentAttrs(hps, idSegment, flAttribute, flAttrFlag)
HPS hps;             /* presentation-space handle */
LONG idSegment;      /* segment identifier        */
LONG flAttribute;    /* attributes                */
LONG flAttrFlag;     /* attribute on|off flag     */
 
The GpiSetSegmentAttrs function sets a segment attribute for a retained
segment. The segment attributes specify whether a segment is chained,
visible, detectable, dynamic, and so on. The function can turn these
attributes on or off, one attribute at a time.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
hps          Identifies the presentation space.
 
idSegment    Specifies the segment to change. It must be greater than zero.
 
flAttribute  Specifies the segment attribute to set or clear. It can be one
             of the following values:
 
             Value                 Meaning
             ───────────────────────────────────────────────────────────────
             ATTR_CHAINED          Chained
 
             ATTR_DETECTABLE       Detectability
 
             ATTR_DYNAMIC          Dynamic
 
             ATTR_FASTCHAIN        Fast chaining
 
             ATTR_PROP_DETECTABLE  Propagate detectability
 
             ATTR_PROP_VISIBLE     Propagate visibility
 
             ATTR_VISIBLE          Visibility
 
flAttrFlag   Specifies whether to turn the attribute on or off. If it is
             ATTR_ON, the function turns on the attribute; if ATTR_OFF, the
             function turns off the attribute.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
one of the following:
 
     PMERR_INV_HPS
     PMERR_INV_MICROPS_FUNCTION
     PMERR_INV_SEG_ATTR
     PMERR_INV_SEG_ATTR_VALUE
     PMERR_INV_SEG_NAME
     PMERR_PS_BUSY
     PMERR_SEG_NOT_FOUND
 
Comments
 
When a segment is modified from non-chained to chained, it is added to the
end of the drawing chain.
 
See Also
 
GpiQuerySegmentAttrs, WinGetLastError