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.
GpiSetStopDraw (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPICONTROL
 
BOOL GpiSetStopDraw(hps, fStopDraw)
HPS hps;           /* presentation-space handle */
LONG fStopDraw;    /* stop-draw condition flag  */
 
The GpiSetStopDraw function sets or clears the stop-draw condition. The
stop-draw condition terminates specific functions that may be executing in
another thread of the process. If the stop-draw condition is set, the system
stops the following functions and forces each to return an error:
 
    GpiDrawChain
    GpiDrawDynamics
    GpiDrawFrom
    GpiDrawSegment
    GpiPlayMetaFile
    GpiPutData
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hps        Identifies the presentation space.
 
fStopDraw  Specifies the stop-draw condition. If it is SDW_OFF, the function
           clears the stop-draw condition. If it is SDW_ON, the function
           sets the condition.
 
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_INV_STOP_DRAW_VALUE
 
Comments
 
The GpiSetStopDraw function lets an application set up and control an
asynchronous thread that carries out long drawing operations. If the
controlling thread needs to stop drawing, it sets the condition. If it wants
to allow drawing, it clears the condition. The stop-draw condition only
affects the listed functions.
 
Using the stop-draw condition to stop drawing to a metafile creates an
unusable metafile.
 
See Also
 
GpiDrawChain, GpiDrawDynamics, GpiDrawFrom, GpiDrawSegment, GpiPlayMetaFile,
GpiPutData, WinGetLastError