gpi12.hlp (Table of Contents; Topic list)
GpiEndElement (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPISEGEDITING
 
BOOL GpiEndElement(hps)
HPS hps;    /* presentation-space handle */
 
The GpiEndElement function ends an element bracket──that is, it ends the
sequence of functions (starting with the GpiBeginElement function) that
define the contents of an element. The GpiEndElement function may only be
used while creating a segment.
 
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_MICROPS_FUNCTION
     PMERR_NOT_IN_ELEMENT
     PMERR_PS_BUSY
 
Example
 
This example uses the GpiEndElement function to end an element bracket:
 
POINTL ptlStart = { 0, 0 };
POINTL ptlTriangle[] = { 100, 100, 200, 0, 0, 0 };
    .
    .
    .
GpiBeginElement(hps, 1L, "Triangle");  /* begin the element bracket  */
GpiMove(hps, &ptlStart);               /* move to start point (0, 0) */
GpiPolyLine(hps, 3L, ptlTriangle);     /* draw triangle              */
GpiEndElement(hps);                    /* end element bracket        */
 
See Also
 
GpiBeginElement, GpiDeleteElement, GpiQueryElement, GpiQueryElementPointer,
GpiSetElementPointer, WinGetLastError