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.
GpiQuerySegmentPriority (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPISEGMENTS
LONG GpiQuerySegmentPriority(hps, idRefSegment, cmdOrder)
HPS hps; /* presentation-space handle */
LONG idRefSegment; /* reference-segment identifier */
LONG cmdOrder; /* segment order */
The GpiQuerySegmentPriority function returns the identifier of the segment
having the next-highest or next-lowest priority, relative to the segment
specified by idRefSegment. The priority of a segment affects how segments in
the picture chain are drawn.
The function uses the cmdOrder parameter to determine whether to look for
the segment with next-highest or next-lowest priority. The function returns
zero if there is no segment with next-highest or next-lowest priority.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
idRefSegment Specifies the identifier of the segment whose priority is
compared, or is zero to specify the segment with lowest or
highest priority.
cmdOrder Specifies whether to check for a segment with higher or lower
priority. It can be one of the following values:
Value Meaning
──────────────────────────────────────────────────────────────
LOWER_PRI Return the identifier for the segment with
next-lowest priority. If idRefSegment is zero, the
function returns the identifier of the segment
with the lowest priority.
HIGHER_PRI Return the identifier of the segment with
next-highest priority. If idRefSegment is zero,
the function returns the identifier of the segment
with the highest priority.
Return Value
The return value is the identifier of the segment with the next-highest or
next-lowest priority if the function is successful. The return value is
GPI_ALTERROR 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_ORDERING_PARM
PMERR_INV_SEG_NAME
PMERR_PS_BUSY
PMERR_SEG_NOT_CHAINED
PMERR_SEG_NOT_FOUND
See Also
GpiDrawChain, GpiDrawFrom, GpiSetSegmentPriority, WinGetLastError
♦