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.
GpiSetElementPointer (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPISEGEDITING
 
BOOL GpiSetElementPointer(hps, idElement)
HPS hps;           /* presentation-space handle */
LONG idElement;    /* element number            */
 
The GpiSetElementPointer function moves the element pointer to the element
specified by idElement. The function uses idElement as the number of
elements to move from the beginning of the segment to reach the new
element.
 
The function can be used only in an open segment and only with DM_RETAIN as
the drawing mode. The function cannot be used in an element bracket.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
idElement  Specifies the element number. If the element number is negative,
           the element pointer is set to zero. If the value is greater than
           the number of elements in the segment, the element pointer is set
           to the last element.
 
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_IN_ELEMENT
     PMERR_INV_MICROPS_FUNCTION
     PMERR_NO_CURRENT_GRAPHICS_SEG
     PMERR_NOT_IN_RETAIN_MODE
     PMERR_PS_BUSY
 
See Also
 
GpiQueryElementPointer, WinGetLastError