Jump to content

GpiQueryInitialSegmentAttrs: Difference between revisions

From EDM2
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..."
 
Ak120 (talk | contribs)
 
(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
:: ATTR_DETECTABLE : Detectability
:: Detectability
:: ATTR_VISIBLE : Visibility
:; ATTR_VISIBLE
:: ATTR_CHAINED : Chained
:: Visibility
:: ATTR_DYNAMIC : Dynamic
:; ATTR_CHAINED
:: ATTR_FASTCHAIN : Fast chaining
:: Chained
:: ATTR_PROP_DETECTABLE : Propagate detectability
:; ATTR_DYNAMIC
:: ATTR_PROP_VISIBLE : Propagate visibility.
:: Dynamic
:; ATTR_FASTCHAIN
:: Fast chaining
:; ATTR_PROP_DETECTABLE
:: Propagate detectability
:; ATTR_PROP_VISIBLE
:: Propagate visibility.


==Return Value==
==Return Value==
; lValue ([[LONG]]) - returns
;lValue (LONG) - returns: Current initial attribute value.
: Current initial attribute value.
:: ATTR_ON : On/yes
:; ATTR_ON
:: ATTR_OFF : Off/no
:: On/yes
:: ATTR_ERROR : Error.
:; 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==
<PRE>
#define INCL_GPISEGMENTS /* Or use INCL_GPI, INCL_PM, */
#include &lt;os2.h&gt;
HPS  hps;        /* Presentation-space handle. */
LONG lAttribute; /* Attribute to be queried. */
LONG lValue;    /* Current initial attribute value. */
lValue = GpiQueryInitialSegmentAttrs(hps, lAttribute);
</PRE>
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 &lt;os2.h&gt;
#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);

Related Functions