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.
GpiDeleteElement (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPISEGEDITING
BOOL GpiDeleteElement(hps)
HPS hps; /* presentation-space handle */
The GpiDeleteElement function deletes an element from the currently open
segment. The function deletes the element pointed to by the element pointer,
then moves the element pointer to the preceding element (if any). The
segment containing the element must be open and the drawing mode must be
DM_RETAIN.
GpiDeleteElement cannot be used in an element bracket.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
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
Example
This example uses the GpiDeleteElement function to delete the third element
from the previously created segment 2:
GpiOpenSegment(hps, 2L); /* open segment #2 */
GpiSetElementPointer(hps, 3L); /* move to third element */
GpiDeleteElement(hps); /* delete element */
GpiCloseSegment(hps); /* close the segment */
See Also
GpiBeginElement, GpiEndElement, GpiQueryElement, GpiQueryElementPointer,
GpiSetElementPointer, WinGetLastError
♦