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.
GpiSetEditMode (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPISEGEDITING
 
BOOL GpiSetEditMode(hps, flEditMode)
HPS hps;            /* presentation-space handle */
LONG flEditMode;    /* editing mode              */
 
The GpiSetEditMode function sets the current editing mode. The editing mode
specifies whether new elements added to a retained segment are inserted into
the segment or whether they replace existing elements. The default editing
mode (set by the GpiCreatePS or GpiResetPS function) is insert.
 
Although the editing mode applies to retained segments only, the
GpiSetEditMode function can be used to change the editing mode at any time,
regardless of the drawing mode. However, the function cannot be used in an
element bracket.
 
Parameter   Description
────────────────────────────────────────────────────────────────────────────
 
hps         Identifies the presentation space.
 
flEditMode  Specifies the editing mode. It can be one of the following
            values:
 
            Value          Meaning
            ────────────────────────────────────────────────────────────────
            SEGEM_INSERT   Insert. The system inserts a new element after
                           the element pointed to by the element pointer.
                           The element pointer is updated to point to the
                           new element.
 
            SEGEM_REPLACE  Replace. The system replaces the element pointed
                           by the element pointer. The element pointer does
                           not change.
 
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_EDIT_MODE
     PMERR_INV_HPS
     PMERR_INV_IN_ELEMENT
     PMERR_INV_MICROPS_FUNCTION
     PMERR_PS_BUSY
 
See Also
 
GpiCreatePS, GpiQueryEditMode, GpiResetPS, GpiSetElementPointerAtLabel,
WinGetLastError