GpiQueryInitialSegmentAttrs: Difference between revisions
Appearance
Created page with "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..." |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 5: | Line 5: | ||
==Parameters== | ==Parameters== | ||
; hps ([[HPS]]) - input | ; hps ([[HPS]]) - input: Presentation-space handle. | ||
: Presentation-space handle. | ; lAttribute ([[LONG]]) - input: Attribute to be queried. | ||
; lAttribute ([[LONG]]) - input | |||
: Attribute to be queried. | |||
: Identifies the attribute to be returned by this function: | : 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== | ==Return Value== | ||
; lValue ( | ;lValue (LONG) - returns: Current initial attribute value. | ||
: Current initial attribute value. | :: ATTR_ON : On/yes | ||
: | :: ATTR_OFF : Off/no | ||
:: ATTR_ERROR : Error. | |||
: | |||
: | |||
==Remarks== | ==Remarks== | ||
| Line 41: | Line 27: | ||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError: | Possible returns from WinGetLastError: | ||
; PMERR_INV_HPS (0x207F) | ; PMERR_INV_HPS (0x207F): An invalid presentation-space handle was specified. | ||
: 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_PS_BUSY (0x20F4) | ; PMERR_INV_SEG_ATTR (0x20C5): An invalid attribute parameter was specified with [[GpiSetSegmentAttrs]], [[GpiQuerySegmentAttrs]], [[GpiSetInitialSegmentAttrs]], or GpiQueryInitialSegmentAttrs. | ||
: An attempt was made to access the presentation space from more than one thread simultaneously. | ; PMERR_INV_MICROPS_FUNCTION (0x20A1): An attempt was made to issue a function that is invalid in a micro presentation space. | ||
; 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== | ==Example Code== | ||
This example uses GpiQueryInitialSegmentAttrs to queries the current state of the dynamic segment attribute. | This example uses GpiQueryInitialSegmentAttrs to queries the current state of the dynamic segment attribute. | ||
<pre> | <pre> | ||
#define INCL_GPISEGMENTS /* Segment functions */ | #define INCL_GPISEGMENTS /* Segment functions */ | ||
#include | #include <os2.h> | ||
LONG lValue; /* current element pointer */ | LONG lValue; /* current element pointer */ | ||
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);