gpi12.hlp (Table of Contents; Topic list)
GpiSetDrawingMode (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPICONTROL
 
BOOL GpiSetDrawingMode(hps, flMode)
HPS hps;        /* presentation-space handle */
LONG flMode;    /* drawing mode              */
 
The GpiSetDrawingMode function sets the drawing mode. The drawing mode
affects all subsequent drawing and attribute functions, including the
GpiPutData function, that occur in open chained segments. The drawing mode
specifies whether the functions are drawn, retained, or drawn and retained.
 
The drawing mode does not affect the functions in unchained segments or
outside of segments. For chained segments, the system stores the functions
if the DM_RETAIN or DM_DRAWANDRETAIN mode is set. If the DM_DRAWANDRETAIN
mode is set, the system draws as well as stores the functions. If the mode
is DM_DRAW, the functions draw only. For unchained segments, drawing and
attribute functions are always retained regardless of the drawing mode.
Outside of segments, the functions draw only.
 
The function cannot be used in an open segment or in an area, path, or
element bracket.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
flMode     Specifies the mode used for subsequent drawing and attribute
           functions. It can be one of the following values:
 
           Value             Meaning
           ─────────────────────────────────────────────────────────────────
           DM_DRAW           Draw only.
 
           DM_RETAIN         Retain only.
 
           DM_DRAWANDRETAIN  Draw and retain.
 
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_DRAWING_MODE
     PMERR_INV_HPS
     PMERR_INV_IN_AREA
     PMERR_INV_IN_ELEMENT
     PMERR_INV_IN_PATH
     PMERR_INV_IN_SEG
     PMERR_INV_MICROPS_FUNCTION
     PMERR_PS_BUSY
 
See Also
 
GpiCloseSegment, GpiOpenSegment, GpiPutData, GpiQueryDrawingMode,
WinGetLastError