GpiQueryInitialSegmentAttrs: Difference between revisions
Appearance
mNo edit summary |
|||
| Line 17: | Line 17: | ||
==Return Value== | ==Return Value== | ||
; lValue ( | ;lValue (LONG) - returns: Current initial attribute value. | ||
:: ATTR_ON : On/yes | :: ATTR_ON : On/yes | ||
:: ATTR_OFF : Off/no | :: ATTR_OFF : Off/no | ||
Latest revision as of 21:35, 17 November 2025
This function returns the current value of a particular initial segment attribute.
Syntax
GpiQueryInitialSegmentAttrs(hps, lAttribute)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- lAttribute (LONG) - input
- Attribute to be queried.
- Identifies the attribute to be returned by this function:
- ATTR_DETECTABLE : Detectability
- ATTR_VISIBLE : Visibility
- ATTR_CHAINED : Chained
- ATTR_DYNAMIC : Dynamic
- ATTR_FASTCHAIN : Fast chaining
- ATTR_PROP_DETECTABLE : Propagate detectability
- ATTR_PROP_VISIBLE : Propagate visibility.
Return Value
- lValue (LONG) - returns
- Current initial attribute value.
- ATTR_ON : On/yes
- ATTR_OFF : Off/no
- ATTR_ERROR : Error.
Remarks
Initial segment attributes are modal settings used to determine the initial attributes of new segments as those new segments are created; see GpiSetInitialSegmentAttrs.
Errors
Possible returns from WinGetLastError:
- PMERR_INV_HPS (0x207F)
- An invalid presentation-space handle was specified.
- PMERR_PS_BUSY (0x20F4)
- An attempt was made to access the presentation space from more than one thread simultaneously.
- PMERR_INV_SEG_ATTR (0x20C5)
- An invalid attribute parameter was specified with GpiSetSegmentAttrs, GpiQuerySegmentAttrs, GpiSetInitialSegmentAttrs, or GpiQueryInitialSegmentAttrs.
- PMERR_INV_MICROPS_FUNCTION (0x20A1)
- An attempt was made to issue a function that is invalid in a micro presentation space.
Example Code
This example uses GpiQueryInitialSegmentAttrs to queries the current state of the dynamic segment attribute.
#define INCL_GPISEGMENTS /* Segment functions */ #include <os2.h> LONG lValue; /* current element pointer */ HPS hps; /* Presentation-space handle */ LONG lAttribute; /* attribute to query */ /* query the dynamic attribute */ lAttribute = ATTR_DYNAMIC; lValue = GpiQueryInitialSegmentAttrs(hps, lAttribute);